qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 1/3] trace: Document programmatically enabling/disab


From: Stefan Hajnoczi
Subject: [Qemu-devel] [PATCH 1/3] trace: Document programmatically enabling/disabling trace events
Date: Tue, 6 Jul 2010 21:13:59 +0100

The simple trace backend exports a function that can be used to
programmatically enable/disable trace events at runtime.

Signed-off-by: Stefan Hajnoczi <address@hidden>
---
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 --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
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]