-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
x64: enable VTune support by default #3821
Conversation
After significant work in the `ittapi-rs` crate, this dependency should build without issue on Wasmtime's supported operating systems: Windows, Linux, and macOS. The difference in the release binary is <20KB, so this change makes `vtune` a default build feature. This change upgrades `ittapi-rs` to v0.2.0 and updates the documentation.
Some more details on this change:
|
Subscribe to Label Actioncc @peterhuene
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:docs"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Having written similar patches to test support on Windows before, this is not sufficient to enable vtune support more widely: there is also a cfg[target_os = "linux"]
that need to be tweaked in profiling.rs
iirc. There we should precisely enable this if the target os is linux or windows or mac, to not break compiling to other OS:es.
Then for the default feature: wonder if, in the Cargo.toml file, we can remove it from the list of dependencies (even optional), and then have per-os specific dependencies that both add the dependency and enable the feature?
In addition to what @bnjbvr mentioned to make this default I think this block and this block need updating to include |
This is resolved by the latest commit.
We could, yes, but it seems like we should do one or the other: either enable the
One of those was already "defaulted" by this PR but I added a default to |
Oh, hold on: we also need to check for |
Oh reading more closely ... personally I think it's ok to skip platform-specific checks in the #[cfg] because Wasmtime probably only really compiles on Linux/macOS/Windows anyway and other platforms likely hit compile errors elsewhere so this wouldn't be the only issue. If Wasmtime is ported to other platforms I think it'd be good to leave this in as "hey this crate probably needs an update" if possible |
@bnjbvr, @alexcrichton: this removes the conditional compilation for the OS based on @alexcrichton's comment--this way, if someone ports Wasmtime to another OS but does not turn the I did add a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I'll defer final approval to @bnjbvr though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine with the wasmtime CLI binary on Linux! Thanks.
the `ittapi` library of JIT events. But it must still be enabled at | ||
runtime--enable runtime support based on how you use Wasmtime: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, it seems the end of this comment after --
would need to be removed, as it contains :
but with no extra indication thereafter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's setting up the list of ways to enable VTune at runtime (if I understand what you mean).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave it and we can fix it up later if we think of a more clear way to word this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, i misread it as a list entry as well, my bad. Maybe can reformulate slightly then:
the `ittapi` library of JIT events. But it must still be enabled at | |
runtime--enable runtime support based on how you use Wasmtime: | |
the `ittapi` library of JIT events. But it must still be enabled at | |
runtime with one of the following: |
* x64: enable VTune support by default After significant work in the `ittapi-rs` crate, this dependency should build without issue on Wasmtime's supported operating systems: Windows, Linux, and macOS. The difference in the release binary is <20KB, so this change makes `vtune` a default build feature. This change upgrades `ittapi-rs` to v0.2.0 and updates the documentation. * review: add configuration for defaults in more places * review: remove OS conditional compilation, add architecture * review: do not default vtune feature in wasmtime-jit
After significant work in the
ittapi-rs
crate, this dependency shouldbuild without issue on Wasmtime's supported operating systems: Windows,
Linux, and macOS. The difference in the release binary is <20KB, so this
change makes
vtune
a default build feature. This change upgradesittapi-rs
to v0.2.0 and updates the documentation.