From 41e17cc8aa75a8e8e604e17fdf8adcccdca60903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Mon, 11 Dec 2023 09:13:34 +0000 Subject: [PATCH] scripts/replay_dump: track total number of instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will help in tracking where we are in the stream when debugging. Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20231211091346.14616-6-alex.bennee@linaro.org> --- scripts/replay-dump.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py index 6f300e4c54..d668193e79 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):