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.
Sourcepub fn from_env() -> HotswapConfig
pub fn from_env() -> HotswapConfig
Build from the environment — the single external entry point (HOTSWAP §8).
LOGOS_HOTSWAP=off forces Eager; LOGOS_TIER_PROFILE picks the preset;
LOGOS_FORCE_TIER pins a fixed tier; LOGOS_TIER_PIN sets per-opt pins.
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§fn default() -> HotswapConfig
fn default() -> 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 ==.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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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.