tenzr::txpr::TracerContext¶
Per-thread stack of active tracing targets; traced operations append to the innermost active Txpr.
#include <tracer.h>
Public Functions¶
| Name | |
|---|---|
| bool | IsActive() Returns true while a tracing scope is active on the calling thread. |
| Txpr * | CurrentTxpr() Returns the innermost active Txpr, or nullptr if none. |
| Txpr * | CurrentTape() Compatibility alias for current_txpr. |
| void | PushTxpr(Txpr * txpr) Pushes txpr as the active tracing target. |
| void | PopTxpr() Pops the innermost tracing target. |
| void | PushTape(Txpr * txpr) Compatibility alias for push_txpr. |
| void | PopTape() Compatibility alias for pop_txpr. |
Public Functions Documentation¶
function IsActive¶
Returns true while a tracing scope is active on the calling thread.
Return: true when the tracer stack is non-empty.
Whether a tracing scope is currently active on this thread.
function CurrentTxpr¶
Returns the innermost active Txpr, or nullptr if none.
Return: The current graph, or nullptr when not tracing.
Get the innermost active Txpr on this thread's tracer stack.
function CurrentTape¶
Compatibility alias for current_txpr.
function PushTxpr¶
Pushes txpr as the active tracing target.
Parameters:
- txpr Graph to make current; must not be null.
Push a graph onto this thread's tracer stack.
function PopTxpr¶
Pops the innermost tracing target.
Pop the innermost graph from this thread's tracer stack.
function PushTape¶
Compatibility alias for push_txpr.
function PopTape¶
Compatibility alias for pop_txpr.