Stream: git-wasmtime

Topic: wasmtime / issue #3769 Cranelift: fix debuginfo wrt cold ...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2022 at 07:25):

bjorn3 commented on issue #3769:

This commit fixes the issue by skipping all cold instructions when
emitting value-label ranges (which are translated into debuginfo). This
means that variables defined in cold blocks will not have DWARF
metadata. But cold blocks are usually compiler-inserted slowpaths, not
user code, so this is probably OK.

That is quite unfortunate. For cg_clif cold blocks will be user specified (using #[cold]). In addition it may make sense to use something like https://arxiv.org/abs/2112.14679 to automatically infer cold blocks.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 05 2022 at 07:38):

cfallin commented on issue #3769:

Indeed, it's not ideal, but the debug code right now is a bit of a mess that is strongly oriented around ranges of instruction offsets and in-order traversals of offsets, and it's hard to justify the effort needed to fix that (probably a few weeks) against all of the other things that need doing and against the existing "certain inputs will cause panics" bug. Cold blocks didn't exist at all until ~a month ago so IMHO providing some support for them, with a baseline of "correct and non-panic'ing compilation" but some feature deficiencies, is better than not making this fix.

Anyone willing to take a deeper dive into the debug code (maybe even replace the analysis with something faster) is of course more than welcome! Always happy to brainstorm better approaches/designs here.


Last updated: Dec 23 2024 at 12:05 UTC