Functions | |
void | os_trace_err (const char *format,...) |
void | os_trace_warn (const char *format,...) |
void | os_trace_info (const char *format,...) |
void | os_trace_dbg (const char *format,...) |
How these messages are read is platform specific. Each module that uses tracing may also have to provide additional platform specific information.
Trace messages are sent to the standard kernel message log (dmesg). If a module defines OS_TRACE_PREFIX then this string is prefixed to all trace messages.
For example,
#define OS_TRACE_PREFIX "module: " #include <oska/trace.h>
WPP software tracing is used. Each driver must:
RUN_WPP=$(SOURCES) -km -scan:$(OSKADIR)\windows\kmdf\trace.h
to the Sources files.
#ifdef OS_TRACE_INCLUDE_TMH #include "filename.tmh" #endif
#define WPP_CONTROL_GUIDS \ WPP_DEFINE_CONTROL_GUID(ModuleTraceGuid \ (210ba3cc,a3a9,42d9,add9,5cfc6d806bae), \ WPP_DEFINE_BIT(OS_TRACE_DFLT) \ ) #include <oska/trace.h>
Trace messages from X.org drivers can be sent to the X.org server log. The driver must #define OS_TRACE_USE_XORG before including <oska/trace.h>
void os_trace_dbg | ( | const char * | format, | |
... | ||||
) |
A debug trace message.
Callable from: any context.
format | printf-style format string. | |
... | arguments for format. |
void os_trace_err | ( | const char * | format, | |
... | ||||
) |
An error trace message.
The printf-style format string must be a constant string literal. The c, d, p, s, and x conversion specifiers and the field length and pad character should be supported (e.g., %08x).
Callable from: any context.
format | printf-style format string. | |
... | arguments for format. |
void os_trace_info | ( | const char * | format, | |
... | ||||
) |
A informational trace message.
Callable from: any context.
format | printf-style format string. | |
... | arguments for format. |
void os_trace_warn | ( | const char * | format, | |
... | ||||
) |
A warning trace message.
Callable from: any context.
format | printf-style format string. | |
... | arguments for format. |