pub struct CompiledTrace {
pub plan_id: String,
pub trace_signature: String,
pub guards: Vec<TraceGuard>,
pub opcode_window: Vec<String>,
pub width: usize,
pub estimated_cost_jit: i64,
pub estimated_cost_fused: i64,
pub tier_improvement_delta: i64,
pub tier: CompilationTier,
}Expand description
A compiled trace stub with guard conditions and dispatch metadata.
Fields§
§plan_id: StringPlan ID this trace was compiled from.
trace_signature: StringTrace signature (hash of opcode window).
guards: Vec<TraceGuard>Guard conditions that must all hold for this trace to execute.
opcode_window: Vec<String>The opcode window this trace covers.
width: usizeWidth of the compiled trace (number of opcodes fused).
estimated_cost_jit: i64Estimated cost of JIT dispatch (lower than tier-1 fused cost).
estimated_cost_fused: i64Original tier-1 fused cost for comparison.
tier_improvement_delta: i64Cost improvement over tier-1: fused - jit.
tier: CompilationTierCompilation tier.
Implementations§
Source§impl CompiledTrace
impl CompiledTrace
Sourcepub fn from_plan(plan: &HostcallSuperinstructionPlan) -> Self
pub fn from_plan(plan: &HostcallSuperinstructionPlan) -> Self
Create a compiled trace from a superinstruction plan.
Sourcepub fn guards_pass(&self, trace: &[String], ctx: &GuardContext) -> bool
pub fn guards_pass(&self, trace: &[String], ctx: &GuardContext) -> bool
Check all guards against the given trace and context.
Trait Implementations§
Source§impl Clone for CompiledTrace
impl Clone for CompiledTrace
Source§fn clone(&self) -> CompiledTrace
fn clone(&self) -> CompiledTrace
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 CompiledTrace
impl Debug for CompiledTrace
Source§impl<'de> Deserialize<'de> for CompiledTrace
impl<'de> Deserialize<'de> for CompiledTrace
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CompiledTrace
impl PartialEq for CompiledTrace
Source§impl Serialize for CompiledTrace
impl Serialize for CompiledTrace
impl Eq for CompiledTrace
impl StructuralPartialEq for CompiledTrace
Auto Trait Implementations§
impl Freeze for CompiledTrace
impl RefUnwindSafe for CompiledTrace
impl Send for CompiledTrace
impl Sync for CompiledTrace
impl Unpin for CompiledTrace
impl UnsafeUnpin for CompiledTrace
impl UnwindSafe for CompiledTrace
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ModelDump for Twhere
T: Serialize,
impl<T> ModelDump for Twhere
T: Serialize,
Source§fn model_dump(&self, options: DumpOptions) -> Result<Value, Error>
fn model_dump(&self, options: DumpOptions) -> Result<Value, Error>
Serialize a model to a JSON value. Read more
Source§fn model_dump_json(&self) -> Result<String, Error>
fn model_dump_json(&self) -> Result<String, Error>
Serialize a model to a JSON string with default options.
Source§fn model_dump_json_pretty(&self) -> Result<String, Error>
fn model_dump_json_pretty(&self) -> Result<String, Error>
Serialize a model to a pretty-printed JSON string.
Source§fn model_dump_json_with_options(
&self,
options: DumpOptions,
) -> Result<String, Error>
fn model_dump_json_with_options( &self, options: DumpOptions, ) -> Result<String, Error>
Serialize a model to a JSON string with full options support. Read more
Source§impl<T> ModelValidate for Twhere
T: DeserializeOwned,
impl<T> ModelValidate for Twhere
T: DeserializeOwned,
Source§fn model_validate(
input: impl Into<ValidateInput>,
options: ValidateOptions,
) -> Result<T, ValidationError>
fn model_validate( input: impl Into<ValidateInput>, options: ValidateOptions, ) -> Result<T, ValidationError>
Create and validate a model from input. Read more
Source§fn model_validate_json(json: &str) -> Result<Self, ValidationError>
fn model_validate_json(json: &str) -> Result<Self, ValidationError>
Create and validate a model from JSON string with default options.
Source§fn model_validate_dict(
dict: HashMap<String, Value>,
) -> Result<Self, ValidationError>
fn model_validate_dict( dict: HashMap<String, Value>, ) -> Result<Self, ValidationError>
Create and validate a model from a HashMap with default options.