Add support for generating perf maps for simple perf profiling (#6030)
* Add support for generating perf maps for simple perf profiling * add missing enum entry in C code * bugfix: use hexa when printing the code region's length too (thanks bjorn3!) * sanitize file name + use bufwriter * introduce --profile CLI flag for wasmtime * Update doc and doc comments for new --profile option * remove redundant FromStr import * Apply review feedback: make_line receives a Write impl, report errors * fix tests? * better docs
This commit is contained in:
@@ -36,6 +36,7 @@ pub enum wasmtime_profiling_strategy_t {
|
||||
WASMTIME_PROFILING_STRATEGY_NONE,
|
||||
WASMTIME_PROFILING_STRATEGY_JITDUMP,
|
||||
WASMTIME_PROFILING_STRATEGY_VTUNE,
|
||||
WASMTIME_PROFILING_STRATEGY_PERFMAP,
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
@@ -157,6 +158,7 @@ pub extern "C" fn wasmtime_config_profiler_set(
|
||||
WASMTIME_PROFILING_STRATEGY_NONE => ProfilingStrategy::None,
|
||||
WASMTIME_PROFILING_STRATEGY_JITDUMP => ProfilingStrategy::JitDump,
|
||||
WASMTIME_PROFILING_STRATEGY_VTUNE => ProfilingStrategy::VTune,
|
||||
WASMTIME_PROFILING_STRATEGY_PERFMAP => ProfilingStrategy::PerfMap,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user