Expand description
Application trace markers: one (marker_id, arg) event that the
APPLICATION places, emitted through the same installed sink the executor’s
own callback events go to.
The id space is shared with the executor’s events, so the application gets a reserved block of its own:
| ids | owner |
|---|---|
| 0 | reserved: what a zeroed id reads as; never emitted |
| 1 ..= 15 | the APPLICATION (APP_MARKER_FIRST..=APP_MARKER_LAST) |
| 16 and up | the executor (16-27 today; the block grows upward) |
An id outside the application block is REFUSED, never clamped: a clamped id would land on another marker’s meaning, and a capture with confidently wrong labels is worse than one with a gap.
The range check and the error type are ungated, so a caller needs no cfg
and an image built without callback tracing still validates its ids. The
emission itself only happens with the trace-callbacks feature and an
installed sink. With no sink installed, emit_app_marker costs the range
compare, one atomic load and one branch; without the feature, the range
compare alone.
Structs§
- AppMarker
IdOut OfRange - An application marker id outside
APP_MARKER_FIRST..=APP_MARKER_LAST. Carries the refused id.
Constants§
- APP_
MARKER_ FIRST - First application marker id.
- APP_
MARKER_ LAST - Last application marker id. Ids from 16 up belong to the executor.
Functions§
- emit_
app_ marker - Emit one application event
(id, arg)through the installed trace sink. - is_
app_ marker - Whether
idis an application marker id.