Expand description
Named emit helpers for the five M1.6 hot phases.
Each helper builds a fully-populated super::TraceEvent for a
specific phase and forwards it to super::emit. Callers who want
finer control can construct events directly with
super::TraceEvent::new and the builders.
§Why this module exists
Engine code that wants to emit a trace event should call one of these
helpers rather than re-typing the Phase/Reason literal tags. That
keeps the call sites short, makes refactors localised, and gives
reviewers a single place to inspect the shape of trace events for
each phase.
All helpers are zero-cost when no sink is installed (one thread-local
read + an Option::is_some branch).
§Wiring status (M1 v1)
These helpers are public API and exercised by the integration test
in tests/trace_sites.rs. Production wiring of these calls into the
XFA layout/data-binding code paths is staged behind a follow-up and
is intentionally not part of M1.6 because:
- The five hot phases live across
xfa-layout-engine::layout,xfa-layout-engine::form, andpdf-xfa::dynamic. Each call site needs case-specific input/decision text that v1 does not yet curate. - Wiring during M1 risks subtle regressions in layout/page-count gates, which would make the determinism gate noisy precisely as we are trying to land it.
Therefore M1.6 ships:
- The taxonomy (M1.5).
- These five typed emit helpers (this module) — exercised end-to-end.
- Documentation in
M1_RESULT.mdmarking the production wiring as PARTIAL with a clear hand-off pointer.