[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/15] simpletrace: fix process() argument count
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 15/15] simpletrace: fix process() argument count |
Date: |
Thu, 1 Sep 2011 09:06:26 +0100 |
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 <address@hidden>
---
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
- [Qemu-devel] [PULL 00/15] Tracing patches, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 03/15] trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_*, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 09/15] trace: always compile support for controlling and querying trace event states, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 15/15] simpletrace: fix process() argument count,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 12/15] trace: [simple] disable all trace points by default, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 08/15] trace: separate trace event control and query routines from the simple backend, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 04/15] trace: [make] replace 'ifeq' with values in CONFIG_TRACE_*, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 02/15] build: [simple] Include qemu-timer-common.o in trace-obj-y, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 10/15] trace: add "-trace events" argument to control initial state, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 05/15] trace: move backend-specific code into the trace/ directory, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 11/15] trace: always use the "nop" backend on events with the "disable" keyword, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 01/15] build: Fix linkage of QEMU_PROG, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 06/15] trace: avoid conditional code compilation during option parsing, Stefan Hajnoczi, 2011/09/01
- [Qemu-devel] [PATCH 14/15] trace: enable all events, Stefan Hajnoczi, 2011/09/01