From 26ce2ed10213913fbda29db4a35ee0f7a95d1efa Mon Sep 17 00:00:00 2001 From: Mark Hansen Date: Sun, 19 Sep 2021 22:52:02 +0000 Subject: Add a tab in front of stack samples in report_sample.py This brings the output closer to the output of linux-perf-tool script. Some tools (e.g. FlameScope) optimise skipping lines starting with tabs, this should help those tools go faster. BUG=200473657 Change-Id: I2144e4dbe83f82d14844082d5dedec14dc7f30fb --- simpleperf/scripts/report_sample.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simpleperf/scripts/report_sample.py b/simpleperf/scripts/report_sample.py index 7af9f2c3..dc178c08 100755 --- a/simpleperf/scripts/report_sample.py +++ b/simpleperf/scripts/report_sample.py @@ -67,10 +67,10 @@ def report_sample( 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 %s (%s)' % (sample.ip, symbol.symbol_name, symbol.dso_name)) + print('\t%16x %s (%s)' % (sample.ip, symbol.symbol_name, symbol.dso_name)) for i in range(callchain.nr): entry = callchain.entries[i] - print('%16x %s (%s)' % (entry.ip, entry.symbol.symbol_name, entry.symbol.dso_name)) + print('\t%16x %s (%s)' % (entry.ip, entry.symbol.symbol_name, entry.symbol.dso_name)) if show_tracing_data: data = lib.GetTracingDataOfCurrentSample() if data: -- cgit v1.2.3