pub struct HotswapConfig {
pub mode: TierMode,
pub thresholds: TierThresholds,
pub force_tier: Option<Tier>,
pub pins: PinSet,
}Expand description
“When does each allowed opt run” — the sibling to OptimizationConfig
(HOTSWAP §8). mode picks the escalation policy, thresholds the rungs,
force_tier pins a fixed tier for deterministic tests, and pins overrides
individual opts.
Fields§
§mode: TierMode§thresholds: TierThresholds§force_tier: Option<Tier>Forces a fixed tier regardless of hotness — the determinism lever for
differential tests (LOGOS_FORCE_TIER). None ⇒ derive from mode + count.
pins: PinSetImplementations§
Source§impl HotswapConfig
impl HotswapConfig
Sourcepub fn effective_tier(&self, count: u32) -> Tier
pub fn effective_tier(&self, count: u32) -> Tier
The tier a unit with count accumulated calls/back-edges should run at,
under this config’s mode (and any force_tier override).
Sourcepub fn run_tier(&self) -> Tier
pub fn run_tier(&self) -> Tier
The tier at which the run path optimizes UPFRONT, before the program executes.
Eager pays the full optimizer (T3, today’s behavior); Tiered/Baseline
start at the baseline (T0) and rely on the native tier — and, later, per-function
re-optimization — to escalate hot code during the run, reclaiming the upfront
optimizer cost (HOTSWAP §12.1). force_tier overrides everything (test
determinism). Distinct from effective_tier, which maps a per-unit hotness
COUNT to a tier; this maps the program-level MODE to the upfront tier.
Trait Implementations§
Source§impl Clone for HotswapConfig
impl Clone for HotswapConfig
Source§fn clone(&self) -> HotswapConfig
fn clone(&self) -> HotswapConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HotswapConfig
impl Debug for HotswapConfig
Source§impl Default for HotswapConfig
impl Default for HotswapConfig
Source§impl PartialEq for HotswapConfig
impl PartialEq for HotswapConfig
Source§fn eq(&self, other: &HotswapConfig) -> bool
fn eq(&self, other: &HotswapConfig) -> bool
self and other values to be equal, and is used by ==.