bytecodealliance / bytecodealliance/wasmtime

Consider only maintaining frame pointers at call and trap sites

Open
#6,100 0 comments 0 reactions 0 assignees View on GitHub
cranelift:goal:optimize-speed
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.