diff mbox

[1/3] trace: Document programmatically enabling/disabling trace events

Message ID 1278447241-2709-1-git-send-email-stefanha@linux.vnet.ibm.com
State New
Headers show

Commit Message

Stefan Hajnoczi July 6, 2010, 8:13 p.m. UTC
The simple trace backend exports a function that can be used to
programmatically enable/disable trace events at runtime.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
This applies to the tracing branch at:

  http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/tracing-dev

 docs/tracing.txt |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/docs/tracing.txt b/docs/tracing.txt
index ec44552..abbae6b 100644
--- a/docs/tracing.txt
+++ b/docs/tracing.txt
@@ -116,6 +116,17 @@  unless you have specific needs for more advanced backends.
 * trace-event NAME on|off
   Enable/disable a given trace event.
 
+==== Enabling/disabling trace events programmatically ====
+
+The change_trace_event_state() function can be used to enable or disable trace
+events at runtime inside QEMU:
+
+    #include "trace.h"
+    
+    change_trace_event_state("virtio_irq", true); /* enable */
+    [...]
+    change_trace_event_state("virtio_irq", false); /* disable */
+
 ==== Analyzing trace files ====
 
 The "simple" backend produces binary trace files that can be formatted with the