Tracing support namespace. More...
Functions | |
void | dbg_bkpt (void) |
Insert a BKPT0 for debugger usage. | |
void | dump_args (int argc, char *argv[]) |
Write the argv[] array to the trace device. | |
void | flush (void) |
Flush the output. | |
void | initialize (void) |
int | printf (const char *format,...) |
Write a formatted string to the trace device. | |
int | putchar (int c) |
Write the single character to the trace device. | |
int | puts (const char *s) |
Write the string and a line terminator to the trace device. | |
int | vprintf (const char *format, std::va_list args) |
Write a formatted variable arguments list to the trace device. | |
ssize_t | write (const void *buf, std::size_t nbyte) |
Write the given number of bytes to the trace output channel. | |
Tracing support namespace.
The trace device is an independent output channel, intended for diagnostic purposes.
The API is simple, and mimics the standard C output calls:
os::trace::printf()
/ trace_printf()
os::trace::puts()
/ trace_puts()
os::trace::putchar()
/ trace_putchar()
The implementation is done in:
If these functions are not defined in another place, there are weak definitions that simply discard the trace output.
Trace support is enabled by adding the TRACE
macro definition.
When TRACE
is not defined, all functions are inlined to empty bodies. This has the advantage that the trace calls do not need to be conditionally compiled with #ifdef TRACE
/ #endif
|
inline |
void os::trace::flush | ( | void | ) |