x64: enable VTune support by default (#3821)

* 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
This commit is contained in:
Andrew Brown
2022-02-22 08:32:09 -08:00
committed by GitHub
parent bbd52772de
commit c183e93b80
9 changed files with 25 additions and 26 deletions

View File

@@ -30,13 +30,10 @@ For more information on VTune and the analysis tools it provides see its
### Turn on VTune support
For JIT profiling with VTune, first build with the `vtune` feature enabled:
```sh
$ cargo build --features=vtune
```
Then, enable runtime support based on how you use Wasmtime:
For JIT profiling with VTune, Wasmtime currently builds with the `vtune` feature
enabled by default. This ensures the compiled binary understands how to inform
the `ittapi` library of JIT events. But it must still be enabled at
runtime--enable runtime support based on how you use Wasmtime:
* **Rust API** - call the [`Config::profiler`] method with
`ProfilingStrategy::VTune` to enable profiling of your wasm modules.
@@ -62,7 +59,7 @@ future.
With VTune [properly installed][download], if you are using the CLI execute:
```sh
$ cargo build --features=vtune
$ cargo build
$ vtune -run-pass-thru=--no-altstack -collect hotspots target/debug/wasmtime --vtune foo.wasm
```