summaryrefslogtreecommitdiffstats
path: root/trace-events
diff options
context:
space:
mode:
authorStefan Hajnoczi2010-05-24 12:32:09 +0200
committerAnthony Liguori2010-09-09 23:22:44 +0200
commit1e2cf2bc455622f9e0903a360cdaf6b89ec949a2 (patch)
tree3181cf9f43c5a8c7fda5a4765b589b58a20cbfdf /trace-events
parenttrace: Support for dynamically enabling/disabling trace events (diff)
downloadqemu-1e2cf2bc455622f9e0903a360cdaf6b89ec949a2.tar.gz
qemu-1e2cf2bc455622f9e0903a360cdaf6b89ec949a2.tar.xz
qemu-1e2cf2bc455622f9e0903a360cdaf6b89ec949a2.zip
trace: Support disabled events in trace-events
Sometimes it is useful to disable a trace event. Removing the event from trace-events is not enough since source code will call the trace_*() function for the event. This patch makes it easy to build without specific trace events by marking them disabled in trace-events: disable multiwrite_cb(void *mcb, int ret) "mcb %p ret %d" This builds without the multiwrite_cb trace event. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> trace: Allow bulk enabling/disabling of trace events at compile time For 'simple' trace backend, allow bulk enabling/disabling of trace events at compile time. Trace events that are preceded by 'disable' keyword are compiled in, but turned off by default. These can individually be turned on using the monitor. All other trace events are enabled by default. TODO : This could be enhanced when the trace-event namespace is partitioned into a group and an ID within that group. In such a case, marking a group as enabled would automatically enable all trace-events listed under it. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'trace-events')
-rw-r--r--trace-events7
1 files changed, 6 insertions, 1 deletions
diff --git a/trace-events b/trace-events
index a37d3cc6e3..2a986ecd29 100644
--- a/trace-events
+++ b/trace-events
@@ -12,10 +12,15 @@
#
# Format of a trace event:
#
-# <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
#
# Example: qemu_malloc(size_t size) "size %zu"
#
+# The "disable" keyword will build without the trace event.
+# In case of 'simple' trace backend, it will allow the trace event to be
+# compiled, but this would be turned off by default. It can be toggled on via
+# the monitor.
+#
# The <name> must be a valid as a C function name.
#
# Types should be standard C types. Use void * for pointers because the trace