From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 15/15] simpletrace: fix process() argument count
Date: Thu, 1 Sep 2011 09:06:26 +0100 [thread overview]
Message-ID: <1314864386-14202-16-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1314864386-14202-1-git-send-email-stefanha@linux.vnet.ibm.com>
The simpletrace.process() function invokes analyzer methods with the
wrong number of arguments if a timestamp should be included. This patch
fixes the issue so that trace analysis scripts can make use of
timestamps.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
scripts/simpletrace.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py
index 2ad5699..f55e5e6 100755
--- a/scripts/simpletrace.py
+++ b/scripts/simpletrace.py
@@ -102,10 +102,10 @@ def process(events, log, analyzer):
fn_argcount = len(inspect.getargspec(fn)[0]) - 1
if fn_argcount == event_argcount + 1:
# Include timestamp as first argument
- return lambda _, rec: fn(*rec[1:2 + fn_argcount])
+ return lambda _, rec: fn(*rec[1:2 + event_argcount])
else:
# Just arguments, no timestamp
- return lambda _, rec: fn(*rec[2:2 + fn_argcount])
+ return lambda _, rec: fn(*rec[2:2 + event_argcount])
analyzer.begin()
fn_cache = {}
--
1.7.5.4
next prev 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 ` [Qemu-devel] [PATCH 12/15] trace: [simple] disable all trace points by default Stefan Hajnoczi
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 ` Stefan Hajnoczi [this message]
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-16-git-send-email-stefanha@linux.vnet.ibm.com \
--to=stefanha@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/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).