* Merge `wasmtime-jit` and `wasmtime-profiling` This commit merges the `wasmtime-profiling` crate into the `wasmtime-jit` crate. It wasn't really buying a ton being a separate crate and an upcoming refactoring I'd like to do is to remove the `FinishedFunctions` structure. To enable the profilers to work as they used to this commit changes them to pass `CompiledModule` as the argument, but this only works if the profiling trait can see the `CompiledModule` type. * Fix a length calculation
24 lines
632 B
Rust
24 lines
632 B
Rust
use crate::{CompiledModule, ProfilingAgent};
|
|
use anyhow::{bail, Result};
|
|
|
|
/// Interface for driving the creation of jitdump files
|
|
#[derive(Debug)]
|
|
pub struct JitDumpAgent {
|
|
_private: (),
|
|
}
|
|
|
|
impl JitDumpAgent {
|
|
/// Intialize a JitDumpAgent and write out the header
|
|
pub fn new() -> Result<Self> {
|
|
if cfg!(feature = "jitdump") {
|
|
bail!("jitdump is not supported on this platform");
|
|
} else {
|
|
bail!("jitdump support disabled at compile time");
|
|
}
|
|
}
|
|
}
|
|
|
|
impl ProfilingAgent for JitDumpAgent {
|
|
fn module_load(&self, _module: &CompiledModule, _dbg_image: Option<&[u8]>) {}
|
|
}
|