Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: Create a per-process JIT dump file #6024

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Mar 15, 2023

We create a new JitDumpAgent per wasmtime::Engine,, and the former creates a new jit dump file in its constructor. Since the jit dump file name has to be unique and must follow the format expected by perf inject, the file name is a constant. This causes a bug that multiple Engines creations will clobber the jit dump file. Because of the file name requirement, we can't simply add a counter suffix in the jit dump file name, because then perf inject wouldn't find the files anymore.

Instead, we can use a single, per-process JIT dump file, that's shared across all the wasmtime::Engine; this works well in practice, and moves the mutex in JitDumpAgent in the outside world.

@alexcrichton alexcrichton added this pull request to the merge queue Mar 15, 2023
Merged via the queue into bytecodealliance:main with commit 2e6c7bf Mar 15, 2023
@bnjbvr bnjbvr deleted the jitdump-multiple-engines branch March 15, 2023 14:54
bnjbvr added a commit to EmbarkStudios/wasmtime that referenced this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants