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:
@@ -11,6 +11,16 @@ cfg_if::cfg_if! {
|
||||
}
|
||||
}
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(target_os = "linux")] {
|
||||
#[path = "profiling/perfmap_linux.rs"]
|
||||
mod perfmap;
|
||||
} else {
|
||||
#[path = "profiling/perfmap_disabled.rs"]
|
||||
mod perfmap;
|
||||
}
|
||||
}
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
// Note: VTune support is disabled on windows mingw because the ittapi crate doesn't compile
|
||||
// there; see also https://github.com/bytecodealliance/wasmtime/pull/4003 for rationale.
|
||||
@@ -24,6 +34,7 @@ cfg_if::cfg_if! {
|
||||
}
|
||||
|
||||
pub use jitdump::JitDumpAgent;
|
||||
pub use perfmap::PerfMapAgent;
|
||||
pub use vtune::VTuneAgent;
|
||||
|
||||
/// Common interface for profiling tools.
|
||||
|
||||
Reference in New Issue
Block a user