Files
wasmtime/crates/jit/src/profiling/vtune_disabled.rs
Benjamin Bouvier 2649d2352c Support vtune profiling of trampolines too (#3687)
* Provide helpers for demangling function names

* Profile trampolines in vtune too

* get rid of mapping

* avoid code duplication with jitdump_linux

* maintain previous default display name for wasm functions

* no dash, grrr

* Remove unused profiling error type
2022-01-19 09:49:23 -06:00

33 lines
761 B
Rust

use crate::ProfilingAgent;
use anyhow::{bail, Result};
/// Interface for driving vtune support
#[derive(Debug)]
pub struct VTuneAgent {
_private: (),
}
impl VTuneAgent {
/// Intialize a VTuneAgent and write out the header
pub fn new() -> Result<Self> {
if cfg!(feature = "vtune") {
bail!("VTune is not supported on this platform.");
} else {
bail!("VTune support disabled at compile time.");
}
}
}
impl ProfilingAgent for VTuneAgent {
fn module_load(&self, _module: &crate::CompiledModule, _dbg_image: Option<&[u8]>) {}
fn load_single_trampoline(
&self,
_name: &str,
_addr: *const u8,
_size: usize,
__pid: u32,
_tid: u32,
) {
}
}