wasmtime_profiling/
jitdump_disabled.rs

1use 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/// Interface for driving the creation of jitdump files
9#[derive(Debug)]
10pub struct JitDumpAgent {
11    _private: (),
12}
13
14impl JitDumpAgent {
15    /// Intialize a JitDumpAgent and write out the header
16    pub fn new() -> Result<Self> {
17        if cfg!(feature = "jitdump") {
18            bail!("jitdump is not supported on this platform");
19        } else {
20            bail!("jitdump support disabled at compile time");
21        }
22    }
23}
24
25impl ProfilingAgent for JitDumpAgent {
26    fn module_load(
27        &self,
28        _module: &Module,
29        _functions: &PrimaryMap<DefinedFuncIndex, *mut [VMFunctionBody]>,
30        _dbg_image: Option<&[u8]>,
31    ) {
32    }
33}