aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2023-12-11 09:13:34 +0000
committerAlex Bennée <alex.bennee@linaro.org>2024-01-08 13:58:35 +0000
commit41e17cc8aa75a8e8e604e17fdf8adcccdca60903 (patch)
tree4cb79095b7c716fa88a4f202a94f937305c664ac /scripts
parentfcc8c529fe45981496f1ee1fb0f59a1f9f36ba8a (diff)
downloadqemu-41e17cc8aa75a8e8e604e17fdf8adcccdca60903.zip
qemu-41e17cc8aa75a8e8e604e17fdf8adcccdca60903.tar.gz
qemu-41e17cc8aa75a8e8e604e17fdf8adcccdca60903.tar.bz2
scripts/replay_dump: track total number of instructions
This will help in tracking where we are in the stream when debugging. Reviewed-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20231211091346.14616-6-alex.bennee@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/replay-dump.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py
index 6f300e4..d668193 100755
--- a/scripts/replay-dump.py
+++ b/scripts/replay-dump.py
@@ -157,10 +157,13 @@ def decode_async(eid, name, dumpfile):
return call_decode(async_decode_table, async_event_kind, dumpfile)
+total_insns = 0
def decode_instruction(eid, name, dumpfile):
+ global total_insns
ins_diff = read_dword(dumpfile)
- print_event(eid, name, "0x%x" % (ins_diff))
+ total_insns += ins_diff
+ print_event(eid, name, "+ %d -> %d" % (ins_diff, total_insns))
return True
def decode_char_write(eid, name, dumpfile):