summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Hansen <markhansen@google.com>2021-09-07 22:37:19 +0000
committerMark Hansen <markhansen@google.com>2021-09-07 22:37:26 +0000
commit2954ddb6746b0eeb2262b46745761578da67a04a (patch)
treec43073333e9777787cf7323260bb08d9107e1397
parent675412c7a0f380566650bcf919818bc3300f82e6 (diff)
downloadextras-2954ddb6746b0eeb2262b46745761578da67a04a.tar.gz
Bring output of report_sample in line with what perf on my workstation outputs:
``` $ perf --version perf version 5.10.40 ``` This makes it possible for tools (like FlameScope: https://github.com/Netflix/flamescope/blob/master/app/perf/regexp.py#L75) that use specific regexes matching the linux-perf-tool to parse the output of this. BUG=199202865 Change-Id: I7fca596e8c0bc70f42ca918b1f56594a3383dfa9
-rwxr-xr-xsimpleperf/scripts/report_sample.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/simpleperf/scripts/report_sample.py b/simpleperf/scripts/report_sample.py
index 24310a40..db74214f 100755
--- a/simpleperf/scripts/report_sample.py
+++ b/simpleperf/scripts/report_sample.py
@@ -49,13 +49,13 @@ def report_sample(record_file, symfs_dir, kallsyms_file, show_tracing_data, prog
sec = sample.time // 1000000000
usec = (sample.time - sec * 1000000000) // 1000
- print('%s\t%d/%d [%03d] %d.%06d:\t\t%d %s:' % (sample.thread_comm,
+ print('%s\t%d/%d [%03d] %d.%06d: %d %s:' % (sample.thread_comm,
sample.pid, sample.tid, sample.cpu, sec,
usec, sample.period, event.name))
- print('%16x\t%s (%s)' % (sample.ip, symbol.symbol_name, symbol.dso_name))
+ print('%16x %s (%s)' % (sample.ip, symbol.symbol_name, symbol.dso_name))
for i in range(callchain.nr):
entry = callchain.entries[i]
- print('%16x\t%s (%s)' % (entry.ip, entry.symbol.symbol_name, entry.symbol.dso_name))
+ print('%16x %s (%s)' % (entry.ip, entry.symbol.symbol_name, entry.symbol.dso_name))
if show_tracing_data:
data = lib.GetTracingDataOfCurrentSample()
if data: