diff options
author | Namhyung Kim <namhyung@kernel.org> | 2023-10-24 17:31:21 -0700 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2023-10-25 10:04:19 -0700 |
commit | a6e4a4a14a8eb6376278db0d3441a2ba124cc30c (patch) | |
tree | 9b6ff8a1e9a85ca3d2ab4f9c444955f6b403a325 /scripts/gdb/linux/timerlist.py | |
parent | b5711042a1c8cc88ed40a5ebf612b36e83a4e2e4 (diff) |
perf report: Fix hierarchy mode on pipe input
The hierarchy mode needs to setup output formats for each evsel.
Normally setup_sorting() handles this at the beginning, but it cannot
do that if data comes from a pipe since there's no evsel info before
reading the data. And then perf report cannot process the samples
in hierarchy mode and think as if there's no sample.
Let's check the condition and setup the output formats after reading
data so that it can find evsels.
Before:
$ ./perf record -o- true | ./perf report -i- --hierarchy -q
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.000 MB - ]
Error:
The - data has no samples!
After:
$ ./perf record -o- true | ./perf report -i- --hierarchy -q
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.000 MB - ]
94.76% true
94.76% [kernel.kallsyms]
94.76% [k] filemap_fault
5.24% perf-ex
5.24% [kernel.kallsyms]
5.06% [k] __memset
0.18% [k] native_write_msr
Acked-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20231025003121.2811738-1-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
0 files changed, 0 insertions, 0 deletions