pub struct TraceJitConfig {
pub trace_threshold: u32,
pub block_threshold: u32,
pub max_side_exits: u32,
pub max_inline_recursion: usize,
pub max_trace_chain: usize,
pub max_trace_len: usize,
}Expand description
Tunable thresholds for the tracing JIT.
All hot/threshold/cap values are surfaced here so callers can adjust the JIT for their workload without recompiling fusevm. Defaults match the constants used through phase 9; aggressive workloads (very hot short loops) might want lower thresholds, while cold-start workloads (script that runs once) might want higher thresholds to avoid spending compile time on traces that won’t pay off.
Apply via JitCompiler::set_config(...) — affects subsequent calls
from the current thread.
Fields§
§trace_threshold: u32Backedges through a loop header before recording arms.
block_threshold: u32Whole-chunk invocations before the block JIT compiles a chunk.
Below this, try_run_block returns None and the caller falls back
to the interpreter — avoiding compile cost for one-shot chunks.
Defaults to 1 (compile on the 2nd invocation) so re-run-heavy
workloads reach native code fast; raise it for cold-start scripts that
run once, or override per-process with FUSEVM_JIT_BLOCK_THRESHOLD.
max_side_exits: u32Mid-trace side-exits before the trace is auto-blacklisted.
max_inline_recursion: usizeMaximum self-recursive levels the recorder will inline.
max_trace_chain: usizeMaximum chained side traces dispatched per backward-branch hop.
max_trace_len: usizeMaximum recorded ops in a single trace before recording aborts.
Implementations§
Source§impl TraceJitConfig
impl TraceJitConfig
Sourcepub const fn defaults() -> Self
pub const fn defaults() -> Self
Defaults matching the phase-1-through-9 constants, except
block_threshold which defaults to 1 (compile on the 2nd invocation)
to favor re-run-heavy workloads. Per-process env overrides
(FUSEVM_JIT_BLOCK_THRESHOLD / FUSEVM_JIT_TRACE_THRESHOLD) are applied
on top of these when a thread first touches the JIT.
Trait Implementations§
Source§impl Clone for TraceJitConfig
impl Clone for TraceJitConfig
Source§fn clone(&self) -> TraceJitConfig
fn clone(&self) -> TraceJitConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more