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 · 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
impl Copy for HotswapConfig
impl Eq for HotswapConfig
impl StructuralPartialEq for HotswapConfig
Auto Trait Implementations§
impl Freeze for HotswapConfig
impl RefUnwindSafe for HotswapConfig
impl Send for HotswapConfig
impl Sync for HotswapConfig
impl Unpin for HotswapConfig
impl UnsafeUnpin for HotswapConfig
impl UnwindSafe for HotswapConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.