qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: "Anthony Liguori" <aliguori@us.ibm.com>, Lluís <xscript@gmx.net>,
	"Lluís Vilanova" <vilanova@ac.upc.edu>
Subject: [Qemu-devel] [PATCH 12/15] trace: [simple] disable all trace points by default
Date: Thu,  1 Sep 2011 09:06:23 +0100	[thread overview]
Message-ID: <1314864386-14202-13-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1314864386-14202-1-git-send-email-stefanha@linux.vnet.ibm.com>

From: Lluís <xscript@gmx.net>

Note that this refers to the backend-specific state (whether the output must be
generated), not the event "disabled" property (which always uses the "nop"
backend).

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
 docs/tracing.txt  |   11 ++++++++---
 scripts/tracetool |    9 ++-------
 trace-events      |    3 ---
 3 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/docs/tracing.txt b/docs/tracing.txt
index 85793cf..d1d4e8c 100644
--- a/docs/tracing.txt
+++ b/docs/tracing.txt
@@ -12,11 +12,16 @@ for debugging, profiling, and observing execution.
     ./configure --trace-backend=simple
     make
 
-2. Run the virtual machine to produce a trace file:
+2. Create a file with the events you want to trace:
 
-    qemu ... # your normal QEMU invocation
+   echo bdrv_aio_readv   > /tmp/events
+   echo bdrv_aio_writev >> /tmp/events
 
-3. Pretty-print the binary trace file:
+3. Run the virtual machine to produce a trace file:
+
+    qemu -trace events=/tmp/events ... # your normal QEMU invocation
+
+4. Pretty-print the binary trace file:
 
     ./simpletrace.py trace-events trace-*
 
diff --git a/scripts/tracetool b/scripts/tracetool
index e2cf117..c740080 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -221,15 +221,10 @@ EOF
 
 linetoc_simple()
 {
-    local name state
+    local name
     name=$(get_name "$1")
-    if has_property "$1" "disable"; then
-        state="0"
-    else
-        state="1"
-    fi
     cat <<EOF
-{.tp_name = "$name", .state=$state},
+{.tp_name = "$name", .state=0},
 EOF
     simple_event_num=$((simple_event_num + 1))
 }
diff --git a/trace-events b/trace-events
index f08d6d0..eb612e8 100644
--- a/trace-events
+++ b/trace-events
@@ -17,9 +17,6 @@
 # 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.
 #
-- 
1.7.5.4

  parent reply	other threads:[~2011-09-01  8:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01  8:06 [Qemu-devel] [PULL 00/15] Tracing patches Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 01/15] build: Fix linkage of QEMU_PROG Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 02/15] build: [simple] Include qemu-timer-common.o in trace-obj-y Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 03/15] trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_* Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 04/15] trace: [make] replace 'ifeq' with values in CONFIG_TRACE_* Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 05/15] trace: move backend-specific code into the trace/ directory Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 06/15] trace: avoid conditional code compilation during option parsing Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 07/15] trace: generalize the "property" concept in the trace-events file Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 08/15] trace: separate trace event control and query routines from the simple backend Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 09/15] trace: always compile support for controlling and querying trace event states Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 10/15] trace: add "-trace events" argument to control initial state Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 11/15] trace: always use the "nop" backend on events with the "disable" keyword Stefan Hajnoczi
2011-09-01  8:06 ` Stefan Hajnoczi [this message]
2011-09-01  8:06 ` [Qemu-devel] [PATCH 13/15] trace: [stderr] add support for dynamically enabling/disabling events Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 14/15] trace: enable all events Stefan Hajnoczi
2011-09-01  8:06 ` [Qemu-devel] [PATCH 15/15] simpletrace: fix process() argument count Stefan Hajnoczi
2011-09-01 19:08 ` [Qemu-devel] [PULL 00/15] Tracing patches Anthony Liguori
2011-09-02  9:39   ` Stefan Hajnoczi
2011-09-02 14:54     ` Anthony Liguori
2011-09-02 15:00       ` Anthony Liguori
2011-09-02 15:30       ` Lluís Vilanova

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1314864386-14202-13-git-send-email-stefanha@linux.vnet.ibm.com \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vilanova@ac.upc.edu \
    --cc=xscript@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).