qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/3] trace: Document programmatically enabling/disabling trace events
@ 2010-07-06 20:13 Stefan Hajnoczi
  2010-07-06 20:14 ` [Qemu-devel] [PATCH 2/3] trace: Conform to QEMU coding style Stefan Hajnoczi
  2010-07-06 20:14 ` [Qemu-devel] [PATCH 3/3] trace: Flush trace buffer on exit Stefan Hajnoczi
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2010-07-06 20:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: sripathik, Stefan Hajnoczi, Prerna Saxena

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 --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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-07-08  8:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-06 20:13 [Qemu-devel] [PATCH 1/3] trace: Document programmatically enabling/disabling trace events Stefan Hajnoczi
2010-07-06 20:14 ` [Qemu-devel] [PATCH 2/3] trace: Conform to QEMU coding style Stefan Hajnoczi
2010-07-06 20:14 ` [Qemu-devel] [PATCH 3/3] trace: Flush trace buffer on exit Stefan Hajnoczi
2010-07-08  6:42   ` Prerna Saxena
2010-07-08  8:28     ` Stefan Hajnoczi
2010-07-08  8:34       ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).