|
Serene Runtime 1.0.0-dev
C runtime for the Serene programming language
|
Platform neutral static tracepoints. More...
Go to the source code of this file.
Macros | |
| #define | SRN_TP_CONSUME(...) |
| #define | SRN_TRACEPOINT(name, ...) |
| Placement matters. | |
| #define | SRN_TRACEPOINT_WITH_GROUP(group, name, ...) |
Platform neutral static tracepoints.
SRN_TP(group, name, args...) is a probe a tracer observes only when attached. It maps to the native facility per platform and falls back to a no-op that still marks its arguments used on platforms with no facility, such as WebAssembly. Call sites never name a platform; this header owns that choice.
Definition in file trace.h.
| #define SRN_TRACEPOINT | ( | name, | |
| ... ) |
Placement matters.
SRN_TRACEPOINT expands to a probe instruction the compiler may leave right at a function's epilogue. Never put it as the last statement before a fiber's return. A fiber entry returns into the context switch trampoline, and a tracer breakpoint sitting on that teardown trips the stack protector and aborts the process under perf. Put it on an ordinary reachable statement with real code after it, and never right after a loop that never exits, where the optimizer deletes the probe. To mark a fiber's own start and end, emit from the scheduler around the switch rather than from inside the fiber.
| #define SRN_TRACEPOINT_WITH_GROUP | ( | group, | |
| name, | |||
| ... ) |