trace: Add trace-events file for declaring trace events
[qemu/stefanha.git] / trace-events
bloba37d3cc6e3231476bc764bc4454b15ceae2789d9
1 # Trace events for debugging and performance instrumentation
3 # This file is processed by the tracetool script during the build.
5 # To add a new trace event:
7 # 1. Choose a name for the trace event.  Declare its arguments and format
8 #    string.
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".
13 # Format of a trace event:
15 # <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
17 # Example: qemu_malloc(size_t size) "size %zu"
19 # The <name> must be a valid as a C function name.
21 # Types should be standard C types.  Use void * for pointers because the trace
22 # system may not have the necessary headers included.
24 # The <format-string> should be a sprintf()-compatible format string.