Insert a trace event of an arbitrary class and type with arbitrary data
#include <sys/neutrino.h> #include <sys/trace.h> int trace_logbc( int class, int event, const void *data, size_t nbytes );
- The class of event that you want to insert.
- The type of event that you want to insert.
- A pointer to the data to include with the event.
- The length of the data, in bytes. The function converts this value into the number of 32-bit integers.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The trace_logbc() function calls TraceEvent() to insert an event of the given class and type with the given data.
- An error occurred (errno is set).
- The requested action has been canceled.
- Bad internal trace buffer address. The requested action has been specified out of order.
- Insufficient memory to allocate the trace buffers.
- The requested action isn't supported.
- The application doesn't have permission to perform the action.