]>
Commit | Line | Data |
---|---|---|
94a420b1 SH |
1 | # Trace events for debugging and performance instrumentation |
2 | # | |
3 | # This file is processed by the tracetool script during the build. | |
4 | # | |
5 | # To add a new trace event: | |
6 | # | |
7 | # 1. Choose a name for the trace event. Declare its arguments and format | |
8 | # string. | |
9 | # | |
10 | # 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() -> | |
11 | # trace_multiwrite_cb(). The source file must #include "trace.h". | |
12 | # | |
13 | # Format of a trace event: | |
14 | # | |
15 | # <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>" | |
16 | # | |
17 | # Example: qemu_malloc(size_t size) "size %zu" | |
18 | # | |
19 | # The <name> must be a valid as a C function name. | |
20 | # | |
21 | # Types should be standard C types. Use void * for pointers because the trace | |
22 | # system may not have the necessary headers included. | |
23 | # | |
24 | # The <format-string> should be a sprintf()-compatible format string. |