pub struct TraceJitCompiler { /* private fields */ }Expand description
Tier-2 trace-JIT compiler and dispatch cache.
Monitors superinstruction plan executions and promotes hot plans to JIT-compiled dispatch stubs when they reach the hotness threshold.
Implementations§
Source§impl TraceJitCompiler
impl TraceJitCompiler
Sourcepub fn new(config: TraceJitConfig) -> Self
pub fn new(config: TraceJitConfig) -> Self
Create a new JIT compiler with the given config.
Sourcepub const fn config(&self) -> &TraceJitConfig
pub const fn config(&self) -> &TraceJitConfig
Access the current config.
Sourcepub const fn telemetry(&self) -> &TraceJitTelemetry
pub const fn telemetry(&self) -> &TraceJitTelemetry
Get a telemetry snapshot.
Sourcepub fn cache_size(&self) -> usize
pub fn cache_size(&self) -> usize
Number of compiled traces in cache.
Sourcepub fn record_plan_execution(
&mut self,
plan: &HostcallSuperinstructionPlan,
) -> bool
pub fn record_plan_execution( &mut self, plan: &HostcallSuperinstructionPlan, ) -> bool
Record that a superinstruction plan was executed at tier-1.
If the plan reaches the hotness threshold, it is promoted to JIT.
Returns true if the plan was promoted.
Sourcepub fn try_jit_dispatch(
&mut self,
plan_id: &str,
trace: &[String],
ctx: &GuardContext,
) -> JitExecutionResult
pub fn try_jit_dispatch( &mut self, plan_id: &str, trace: &[String], ctx: &GuardContext, ) -> JitExecutionResult
Attempt JIT dispatch for a given trace and plan ID.
Returns a JitExecutionResult indicating whether JIT was used
and any deoptimization reason.
Sourcepub fn get_compiled_trace(&self, plan_id: &str) -> Option<&CompiledTrace>
pub fn get_compiled_trace(&self, plan_id: &str) -> Option<&CompiledTrace>
Look up a compiled trace by plan ID (read-only).
Sourcepub fn is_invalidated(&self, plan_id: &str) -> bool
pub fn is_invalidated(&self, plan_id: &str) -> bool
Check if a plan ID has been invalidated.
Trait Implementations§
Source§impl Clone for TraceJitCompiler
impl Clone for TraceJitCompiler
Source§fn clone(&self) -> TraceJitCompiler
fn clone(&self) -> TraceJitCompiler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TraceJitCompiler
impl Debug for TraceJitCompiler
Auto Trait Implementations§
impl Freeze for TraceJitCompiler
impl RefUnwindSafe for TraceJitCompiler
impl Send for TraceJitCompiler
impl Sync for TraceJitCompiler
impl Unpin for TraceJitCompiler
impl UnsafeUnpin for TraceJitCompiler
impl UnwindSafe for TraceJitCompiler
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().