| From 7885640b9d6d8fef43f9f1c081252c7eef7d18d6 Mon Sep 17 00:00:00 2001 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Tue, 23 Jul 2024 14:28:58 +0100 |
| Subject: perf scripts python cs-etm: Restore first sample log in verbose mode |
| |
| From: James Clark <james.clark@linaro.org> |
| |
| [ Upstream commit ae8e4f4048b839c1cb333d9e3d20e634b430139e ] |
| |
| The linked commit moved the early return on the first sample to before |
| the verbose log, so move the log earlier too. Now the first sample is |
| also logged and not skipped. |
| |
| Fixes: 2d98dbb4c9c5b09c ("perf scripts python arm-cs-trace-disasm.py: Do not ignore disam first sample") |
| Reviewed-by: Leo Yan <leo.yan@arm.com> |
| Signed-off-by: James Clark <james.clark@linaro.org> |
| Cc: Adrian Hunter <adrian.hunter@intel.com> |
| Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> |
| Cc: Benjamin Gray <bgray@linux.ibm.com> |
| Cc: coresight@lists.linaro.org |
| Cc: gankulkarni@os.amperecomputing.com |
| Cc: Ian Rogers <irogers@google.com> |
| Cc: Ingo Molnar <mingo@redhat.com> |
| Cc: Jiri Olsa <jolsa@kernel.org> |
| Cc: Mark Rutland <mark.rutland@arm.com> |
| Cc: Mike Leach <mike.leach@linaro.org> |
| Cc: Namhyung Kim <namhyung@kernel.org> |
| Cc: Peter Zijlstra <peterz@infradead.org> |
| Cc: Ruidong Tian <tianruidong@linux.alibaba.com> |
| Cc: Suzuki Poulouse <suzuki.poulose@arm.com> |
| Link: https://lore.kernel.org/r/20240723132858.12747-1-james.clark@linaro.org |
| Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| --- |
| tools/perf/scripts/python/arm-cs-trace-disasm.py | 9 ++++----- |
| 1 file changed, 4 insertions(+), 5 deletions(-) |
| |
| diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py |
| index d973c2baed1c8..7aff02d84ffb3 100755 |
| --- a/tools/perf/scripts/python/arm-cs-trace-disasm.py |
| +++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py |
| @@ -192,17 +192,16 @@ def process_event(param_dict): |
| ip = sample["ip"] |
| addr = sample["addr"] |
| |
| + if (options.verbose == True): |
| + print("Event type: %s" % name) |
| + print_sample(sample) |
| + |
| # Initialize CPU data if it's empty, and directly return back |
| # if this is the first tracing event for this CPU. |
| if (cpu_data.get(str(cpu) + 'addr') == None): |
| cpu_data[str(cpu) + 'addr'] = addr |
| return |
| |
| - |
| - if (options.verbose == True): |
| - print("Event type: %s" % name) |
| - print_sample(sample) |
| - |
| # If cannot find dso so cannot dump assembler, bail out |
| if (dso == '[unknown]'): |
| return |
| -- |
| 2.43.0 |
| |