I would like to trace systemwide tracepoints. Perf list tells me that the following tracepoints are available:
block:block_io_start [Tracepoint event]
block:block_plug [Tracepoint event]
block:block_rq_complete [Tracepoint event]
block:block_rq_error [Tracepoint event]
block:block_rq_insert [Tracepoint event]
...
power:cpu_frequency [Tracepoint event]
power:cpu_frequency_limits [Tracepoint event]
power:cpu_idle [Tracepoint event]
power:cpu_idle_miss [Tracepoint event]
I understand that I should trace the tracepoints with
perf record -e TRACEPOINT -a
for a systemwide trace. However, I am told that the tracepoint is an unsupported tracepoint
:
perf record -e block:block_io_start -a
event syntax error: 'block:block_io_start'
\___ unsupported tracepoint
libtraceevent is necessary for tracepoint support
Run 'perf list' for a list of valid events
I installed all libtraceevent*
pacakges. My kernel is:
6.8.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Sep 11 15:25:05 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
You will likely have to rebuild perf with libtraceevent support. Depending on your system the process might include installing the linux-source package and possibly build-essential, and of course libtraceevent-dev. Then
cd /usr/src/linux-source-…/tools/perf && make
It's hard to trace why perf is built without libtraceevent, but bug https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2019247 has some pointers, as does https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2076190
I'm eagerly waiting for the reintroduction of libtraceevent into perf in Ubuntu Noble, ref that last bug.