bytecodealliance / bytecodealliance/wasmtime

Wasmtime debugging: clone only `.text`, not whole code image

Open
#12,104 0 comments 0 reactions 0 assignees View on GitHub
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

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.