cranelift: Add a flag for preserving frame pointers (#4469)

Preserving frame pointers -- even inside leaf functions -- makes it easy to
capture the stack of a running program, without requiring any side tables or
metadata (like `.eh_frame` sections). Many sampling profilers and similar tools
walk frame pointers to capture stacks. Enabling this option will play nice with
those tools.
This commit is contained in:
Nick Fitzgerald
2022-07-20 08:02:21 -07:00
committed by GitHub
parent 6e099720af
commit 22d91a7c84
8 changed files with 96 additions and 7 deletions

View File

@@ -393,6 +393,7 @@ impl Engine {
| "machine_code_cfg_info"
| "tls_model" // wasmtime doesn't use tls right now
| "opt_level" // opt level doesn't change semantics
| "preserve_frame_pointers" // we don't currently rely on frame pointers
| "enable_alias_analysis" // alias analysis-based opts don't change semantics
| "probestack_func_adjusts_sp" // probestack above asserted disabled
| "probestack_size_log2" // probestack above asserted disabled