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

rust: use a different METHOD_LOAD event #105

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Conversation

abrown
Copy link
Contributor

@abrown abrown commented Oct 19, 2023

Previously, the Rust bindings used the iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED event to notify VTune of new JIT code. This may not be correct: it is unclear from the documentation, but an "inline JIT-compiled method" sounds more like self-modifying code, not typically what we think of with JIT-compiled code. JIT-compiled code, as used elsewhere (e.g., Wasmtime), is typically emitted in a memory allocation that is separate from the runtime binary code region. This change uses the iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED event instead.

Previously, the Rust bindings used the
`iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED` event to notify VTune of
new JIT code. This may not be correct: it is unclear from the
documentation, but an "inline JIT-compiled method" sounds more like
self-modifying code, not typically what we think of with JIT-compiled
code. JIT-compiled as used elsewhere (e.g., Wasmtime) is emitted in a
memory allocation that is separate from the runtime binary code region.
This change uses the `iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED` event
instead.
@abrown abrown marked this pull request as ready for review October 23, 2023 17:38
@rahulchaphalkar
Copy link
Contributor

Just tested this change with wasmtime, it fixes the Dynamic Code visibility issue. Tested with a simple Fibonacci fib.wasm file, and can see the following with vtune -

pr_upload

Checked collection logs of vtune, nothing suspicious there. Change looks good.

@abrown abrown merged commit f342766 into intel:master Oct 23, 2023
9 checks passed
@abrown abrown deleted the fix-load-method branch October 23, 2023 17:41
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.

3 participants