wasmtime_profiling/
vtune_disabled.rs1use crate::ProfilingAgent;
2use anyhow::{bail, Result};
3use wasmtime_environ::entity::PrimaryMap;
4use wasmtime_environ::wasm::DefinedFuncIndex;
5use wasmtime_environ::Module;
6use wasmtime_runtime::VMFunctionBody;
7
8#[derive(Debug)]
10pub struct VTuneAgent {
11 _private: (),
12}
13
14impl VTuneAgent {
15 pub fn new() -> Result<Self> {
17 if cfg!(feature = "vtune") {
18 bail!("VTune is not supported on this platform.");
19 } else {
20 bail!("VTune support disabled at compile time.");
21 }
22 }
23}
24
25impl ProfilingAgent for VTuneAgent {
26 fn module_load(
27 &self,
28 _module: &Module,
29 _functions: &PrimaryMap<DefinedFuncIndex, *mut [VMFunctionBody]>,
30 _dbg_image: Option<&[u8]>,
31 ) {
32 }
33}