From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51732 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWEXE-0006ri-Fr for qemu-devel@nongnu.org; Tue, 06 Jul 2010 16:14:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWEXD-0004DP-3V for qemu-devel@nongnu.org; Tue, 06 Jul 2010 16:14:28 -0400 Received: from mtagate6.uk.ibm.com ([194.196.100.166]:45563) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWEXC-0004D5-QQ for qemu-devel@nongnu.org; Tue, 06 Jul 2010 16:14:27 -0400 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate6.uk.ibm.com (8.13.1/8.13.1) with ESMTP id o66KEODX000984 for ; Tue, 6 Jul 2010 20:14:24 GMT Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o66KEH7f1630390 for ; Tue, 6 Jul 2010 21:14:24 +0100 Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o66KEHTl004607 for ; Tue, 6 Jul 2010 21:14:17 +0100 From: Stefan Hajnoczi Date: Tue, 6 Jul 2010 21:13:59 +0100 Message-Id: <1278447241-2709-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1/3] trace: Document programmatically enabling/disabling trace events List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: sripathik@in.ibm.com, 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 --- 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