Get the flag from the header of a trace event
#include <sys/trace.h> #define _TRACE_GET_STRUCT(h)...
The _TRACE_GET_STRUCT() macro extracts the flag from the header of a trace event (the header member of a traceevent_t or an event_data_t structure). Once you've extracted the flag, you can compare it to the following values to determine whether it's a simple event of part of a combine event:
If the flag equals: | The structure is: |
---|---|
_TRACE_STRUCT_CB | The beginning of a combine event |
_TRACE_STRUCT_CC | A continuation of a combine event |
_TRACE_STRUCT_CE | The end of a combine event |
_TRACE_STRUCT_S | A simple event |
See the parser in the Sample Programs appendix of the System Analysis Toolkit User's Guide.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | Yes |
Signal handler | Yes |
Thread | Yes |