Skip to content

Move JIT debug image registration to CodeMemory#9470

Merged
alexcrichton merged 3 commits into
bytecodealliance:mainfrom
SingleAccretion:DI-Dups
Oct 16, 2024
Merged

Move JIT debug image registration to CodeMemory#9470
alexcrichton merged 3 commits into
bytecodealliance:mainfrom
SingleAccretion:DI-Dups

Conversation

@SingleAccretion
Copy link
Copy Markdown
Contributor

@SingleAccretion SingleAccretion commented Oct 15, 2024

JIT images correspond to ELF images, which may represent multiple modules within a single component.

Fixes #9461.

Tested manually on a moderately large component as well as with the existing LLDB tests.

Comment thread tests/all/debug/lldb.rs
Comment on lines -66 to -67
#[cfg(all(
any(target_os = "linux", target_os = "macos"),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these tests are #[ignore]d by default, and run fine on Windows when explicitly requested, it seems there is no reason to have these guards anymore.

JIT images correspond to ELF images, which may represent
multiple modules within a single component.
@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Oct 16, 2024
Copy link
Copy Markdown
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR as well as for the issue! This looks like the right fix to me. I suspect that writing a test for this will be relatively hard, so otherwise having the preexisting tests pass I think is sufficient for this.

I also think that the bug you highlighted where we're double-registering with the native profiler is probably also an issue as well. If you'd like that's ok to defer to a second PR to fix, or if you'd like bundling it in here I think would be reasonable too

@SingleAccretion
Copy link
Copy Markdown
Contributor Author

SingleAccretion commented Oct 16, 2024

I also think that the bug you highlighted where we're double-registering with the native profiler is probably also an issue as well.

Opened #9478 about this.

The fix there is going to be a little trickier since the profiler's "get name" callback operates on actual per-module state.

@SingleAccretion SingleAccretion marked this pull request as ready for review October 16, 2024 22:13
@SingleAccretion SingleAccretion requested a review from a team as a code owner October 16, 2024 22:13
@SingleAccretion SingleAccretion requested review from pchickey and removed request for a team October 16, 2024 22:13
Comment thread crates/wasmtime/src/runtime/code_memory.rs Outdated
@alexcrichton alexcrichton added this pull request to the merge queue Oct 16, 2024
Merged via the queue into bytecodealliance:main with commit ae3bf36 Oct 16, 2024
@SingleAccretion SingleAccretion deleted the DI-Dups branch October 31, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate JIT debug module registrations with components

2 participants