On my Ubuntu 22.04 (5.19.0-35-generic), it seems that perf sched
is not able to parse its own perf.data
output. Following the examples on Brendan Gregg's blog, recording works fine
# perf sched record -- sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 2.844 MB perf.data (11439 samples) ]
However, any my attempt at reading the profiling data fails:
# perf script --header
incompatible file format (rerun with -v to learn more)
# perf sched script
incompatible file format (rerun with -v to learn more)
# perf sched latency
incompatible file format (rerun with -v to learn more)
# perf sched map
incompatible file format (rerun with -v to learn more)
The verbose output just tells broken or missing trace data
:
# perf script -v --header
build id event received for [kernel.kallsyms]: 77ab8542b6540fae3367bbb18a7aeede3c3b6f7b [20]
build id event received for [vdso]: f33b8f26bed889157b75129711599f9ca5ec9d0e [20]
broken or missing trace data
incompatible file format (rerun with -v to learn more)
Googling a bit, I only found old bug reports, but their workarounds don't apply to my case:
# perf script --header -i - < perf.data
incompatible file format (rerun with -v to learn more)
Furthermore, I found that running the same commands with sudo
works fine:
# sudo perf sched record -- sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 3.875 MB perf.data (19424 samples) ]
# sudo perf script --header
<output>
Any clue what's the issue with the non-sudo commands?