bytecodealliance / bytecodealliance/wasmtime
Wasmtime debugging: clone only `.text`, not whole code image
Open
performance
wasmtime
wasmtime:debugging
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 121
Description
In #12051 we added functionality to create private `CodeMemory`s per `Store` for each module instantiated in that store so that we could patch in breakpoints.
The functionality currently clones the whole `MmapVec` per store when guest-debugging is enabled. In theory we only need to clone the `.text` section. The clone is often cheap (when the file is mmap'd from disk) but not always, e.g. when compiled in-memory.
We should clone only `.text` and separate out the cloned `.text` in the representation of `StoreCodeStorage::Private`.
Contributor guide
Assessment
This issue has not been assessed yet.