pub struct JitRuntime {
pub hot_threshold: u32,
/* private fields */
}Available on crate feature
jit only.Expand description
Runtime-wide JIT state: compiled traces are shared; each worker thread owns
its own Cranelift module for compilation ([super::module_local]).
Fields§
§hot_threshold: u32Implementations§
Source§impl JitRuntime
impl JitRuntime
pub fn new(chunk: Arc<Chunk>, hot_threshold: u32) -> Self
pub fn with_default_threshold(chunk: Arc<Chunk>) -> Self
Sourcepub fn matches_chunk(&self, vm_chunk: &Arc<Chunk>) -> bool
pub fn matches_chunk(&self, vm_chunk: &Arc<Chunk>) -> bool
True when vm_chunk is the same image as the JIT cache.
Sourcepub fn reload(&self, chunk: Arc<Chunk>)
pub fn reload(&self, chunk: Arc<Chunk>)
Replace the bytecode image and discard stale compiled traces.
pub fn get_trace(&self, key: &TraceKey) -> Option<JitEntryCopy>
pub fn insert_trace(&self, key: TraceKey, trace: CompiledTrace)
pub fn record_hot_hit(&self, key: TraceKey) -> bool
Auto Trait Implementations§
impl !Freeze for JitRuntime
impl RefUnwindSafe for JitRuntime
impl Send for JitRuntime
impl Sync for JitRuntime
impl Unpin for JitRuntime
impl UnsafeUnpin for JitRuntime
impl UnwindSafe for JitRuntime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more