Skip to main content

Module tier_trace

Module tier_trace 

Source
Expand description

LOGOS_TIER_TRACE — one line per execution-tier hot-swap (HOTSWAP §P13).

When the env var is set (and non-empty, non-"0"), the VM emits a line to stderr every time a function body is swapped to a hotter tier: baseline bytecode → warm bytecode (Axis-1) → native via forge (Axis-2) → native via AOT cdylib (Axis-3). This is the “we must be able to know and understand” observability hook — it makes the otherwise-invisible tier ladder legible without a debugger. The formatting is a pure function so it can be asserted directly.

Enums§

ExecTier
The execution tier a function body runs at, coldest to hottest.

Functions§

format_transition
Format one tier-transition line. Pure — the unit under test.
trace_enabled
Whether LOGOS_TIER_TRACE requests the trace (set, non-empty, not "0").
trace_transition
Emit a transition line iff the trace is enabled.