From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: "Lluís Vilanova" <vilanova@ac.upc.edu>,
"Stefan Hajnoczi" <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1.1 1/2] simpletrace: skip disabled trace event numbering
Date: Tue, 22 May 2012 17:03:01 +0100 [thread overview]
Message-ID: <1337702582-26368-2-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1337702582-26368-1-git-send-email-stefanha@linux.vnet.ibm.com>
The simple trace code generator has been rewritten for QEMU 1.1 and now
assigns event numbers only to enabled events. This means we must skip
disabled events when pretty-printing traces in simpletrace.py.
Note this means old binary traces may be pretty printed incorrectly
since they use a different event numbering when the "disable" keyword is
present in ./trace-events. It's unfortunate but not easy to avoid at
this stage. Always use the simpletrace.py that came with the QEMU
binary to ensure correctly pretty-printing.
Reported-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
scripts/simpletrace.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py
index f55e5e6..db39b02 100755
--- a/scripts/simpletrace.py
+++ b/scripts/simpletrace.py
@@ -37,8 +37,9 @@ def parse_events(fobj):
continue
disable, name, args = m.groups()
- events[event_num] = (name,) + get_argnames(args)
- event_num += 1
+ if not disable:
+ events[event_num] = (name,) + get_argnames(args)
+ event_num += 1
return events
def read_record(fobj):
--
1.7.10
next prev parent reply other threads:[~2012-05-22 16:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 16:03 [Qemu-devel] [PATCH 1.1 0/2] tracing: QEMU 1.1-rc3+ fixes Stefan Hajnoczi
2012-05-22 16:03 ` Stefan Hajnoczi [this message]
2012-05-22 16:03 ` [Qemu-devel] [PATCH 1.1 2/2] tracetool: allow parenthesis in trace-events format strings Stefan Hajnoczi
2012-05-22 18:06 ` 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=1337702582-26368-2-git-send-email-stefanha@linux.vnet.ibm.com \
--to=stefanha@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=vilanova@ac.upc.edu \
/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).