[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/11] simpletrace: build() missing 2 required positional argument
From: |
Stefan Hajnoczi |
Subject: |
[PULL 09/11] simpletrace: build() missing 2 required positional arguments |
Date: |
Mon, 1 Feb 2021 15:47:01 +0000 |
From: Volker Rümelin <vr_qemu@t-online.de>
Commit 4e66c9ef64 "tracetool: add input filename and line number to
Event" forgot to add a line number and a filename argument at one
build method call site.
Traceback (most recent call last):
File "./scripts/simpletrace.py", line 261, in <module>
run(Formatter())
File "./scripts/simpletrace.py", line 236, in run
process(events, sys.argv[2], analyzer, read_header=read_header)
File "./scripts/simpletrace.py", line 177, in process
dropped_event =
Event.build("Dropped_Event(uint64_t num_events_dropped)")
TypeError: build() missing 2 required positional arguments:
'lineno' and 'filename'
Add the missing arguments.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210131173415.3392-1-vr_qemu@t-online.de
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
scripts/simpletrace.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py
index 20f0026066..d61fb0bd87 100755
--- a/scripts/simpletrace.py
+++ b/scripts/simpletrace.py
@@ -174,7 +174,9 @@ def process(events, log, analyzer, read_header=True):
if read_header:
read_trace_header(log)
- dropped_event = Event.build("Dropped_Event(uint64_t num_events_dropped)")
+ frameinfo = inspect.getframeinfo(inspect.currentframe())
+ dropped_event = Event.build("Dropped_Event(uint64_t num_events_dropped)",
+ frameinfo.lineno + 1, frameinfo.filename)
edict = {"dropped": dropped_event}
idtoname = {dropped_event_id: "dropped"}
--
2.29.2
- Re: [PULL 10/11] trace: document how to specify multiple --trace patterns, (continued)
- Re: [PULL 10/11] trace: document how to specify multiple --trace patterns, BALATON Zoltan, 2021/02/01
- Re: [PULL 10/11] trace: document how to specify multiple --trace patterns, Kevin Wolf, 2021/02/01
- Re: [PULL 10/11] trace: document how to specify multiple --trace patterns, Paolo Bonzini, 2021/02/01
- Re: [PULL 10/11] trace: document how to specify multiple --trace patterns, BALATON Zoltan, 2021/02/01
- Re: [PULL 10/11] trace: document how to specify multiple --trace patterns, Markus Armbruster, 2021/02/02
- Re: [PULL 10/11] trace: document how to specify multiple --trace patterns, BALATON Zoltan, 2021/02/02
- Re: [PULL 10/11] trace: document how to specify multiple --trace patterns, Paolo Bonzini, 2021/02/02
- Re: [PULL 10/11] trace: document how to specify multiple --trace patterns, Daniel P . Berrangé, 2021/02/01
- Re: [PULL 10/11] trace: document how to specify multiple --trace patterns, BALATON Zoltan, 2021/02/01
- Re: [PULL 10/11] trace: document how to specify multiple --trace patterns, Stefan Hajnoczi, 2021/02/02
[PULL 09/11] simpletrace: build() missing 2 required positional arguments,
Stefan Hajnoczi <=
[PULL 05/11] tracetool: also strip %l and %ll from systemtap format strings, Stefan Hajnoczi, 2021/02/01
Re: [PULL 00/11] Tracing patches, Peter Maydell, 2021/02/02