Adds VTune profiling strategy to the C-API (#4316)

C-API currently only includes the jitdump strategy intended for use with
perf. This adds the vtune strategy for use with Intel VTune Profiler.
This commit is contained in:
Johnnie Birch
2022-06-27 06:56:16 -07:00
committed by GitHub
parent 84a43d86a1
commit 90876f717d

View File

@@ -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]
@@ -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,
});
}