From 0910495e987c3e3ec9da8d5ef8d2c6ec6d7a7f50 Mon Sep 17 00:00:00 2001 From: Johnnie Birch Date: Mon, 27 Jun 2022 06:56:16 -0700 Subject: [PATCH] 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. --- crates/c-api/src/config.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/c-api/src/config.rs b/crates/c-api/src/config.rs index 144504be8231..ec7b86a8a656 100644 --- a/crates/c-api/src/config.rs +++ b/crates/c-api/src/config.rs @@ -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, }); }