bytecodealliance / bytecodealliance/wasmtime
Consider only maintaining frame pointers at call and trap sites
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
We use frame pointers for fast stack walking, but we only walk the stack from function calls and from trap locations, so we only need to preserve the frame pointers at those locations. In between such sites, we could reuse the frame pointer register for whatever else we need, getting a bit of an execution speed up.
This would, however, mean that we would stop playing nice with external profilers that do not rely on DWARF/`.eh_frame`.
Right now cranelift has a `preserve_frame_pointers=` option. We could turn that into a tribool of `yes/no/call-and-trap-sites` and surface the option through `wasmtime::Config` as well.
Contributor guide
Assessment
This issue has not been assessed yet.