Skip to content

Commit

Permalink
Adds VTune profiling strategy to the C-API (bytecodealliance#4316)
Browse files Browse the repository at this point in the history
C-API currently only includes the jitdump strategy intended for use with
perf. This adds the vtune strategy for use with Intel VTune Profiler.
  • Loading branch information
jlb6740 authored and afonso360 committed Jun 30, 2022
1 parent 4803a1f commit 0910495
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/c-api/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub enum wasmtime_opt_level_t {
pub enum wasmtime_profiling_strategy_t {
WASMTIME_PROFILING_STRATEGY_NONE,
WASMTIME_PROFILING_STRATEGY_JITDUMP,
WASMTIME_PROFILING_STRATEGY_VTUNE,
}

#[no_mangle]
Expand Down Expand Up @@ -149,6 +150,7 @@ pub extern "C" fn wasmtime_config_profiler_set(
c.config.profiler(match strategy {
WASMTIME_PROFILING_STRATEGY_NONE => ProfilingStrategy::None,
WASMTIME_PROFILING_STRATEGY_JITDUMP => ProfilingStrategy::JitDump,
WASMTIME_PROFILING_STRATEGY_VTUNE => ProfilingStrategy::VTune,
});
}

Expand Down

0 comments on commit 0910495

Please sign in to comment.