summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Hansen <markhansen@google.com>2021-08-31 06:39:10 +0000
committerMark Hansen <markhansen@google.com>2021-08-31 06:41:47 +0000
commita83dc498969481bf684df0b5c509128e311540cf (patch)
tree4864844e95c84d4b87891a9e46cdec557e0f9933
parent082b8c9785a7ba0fe8bdb1db73c92e8293531541 (diff)
downloadextras-a83dc498969481bf684df0b5c509128e311540cf.tar.gz
Add PID to report_sample.py
This is equivalent to the output of running `perf script -F +pid` This field is read by Firefox Profiler to group tids by their process: https://profiler.firefox.com/docs/#/./guide-perf-profiling?id=step-2-convert-the-profile Change-Id: I5002110cb76ad76941fb9ee19755e5c1bafdfae3 BUG=198242250
-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 e1c0791f..24310a40 100755
--- a/simpleperf/scripts/report_sample.py
+++ b/simpleperf/scripts/report_sample.py
@@ -49,9 +49,9 @@ 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 [%03d] %d.%06d:\t\t%d %s:' % (sample.thread_comm,
- sample.tid, sample.cpu, sec,
- usec, sample.period, event.name))
+ print('%s\t%d/%d [%03d] %d.%06d:\t\t%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))
for i in range(callchain.nr):
entry = callchain.entries[i]