Merge wasmtime-jit and wasmtime-profiling (#3247)
* 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
This commit is contained in:
23
crates/jit/src/profiling/jitdump_disabled.rs
Normal file
23
crates/jit/src/profiling/jitdump_disabled.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
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]>) {}
|
||||
}
|
||||
Reference in New Issue
Block a user