Listing and using custom Linux kernel tracepoints

2.5k views Asked by At

I followed the tutorial at https://www.kernel.org/doc/Documentation/trace/tracepoints.txt to create a custom tracepoint in the kernel core (i.e. not in a loadable module).

But, I don't see the tracepoint listed in the outputs of perf list or tplist (from bcc tools).

And so, I don't know how to use the tracepoint.

Question: How do I make the tracepoint appear in perf list/tplist output?

Thanks.

1

There are 1 answers

0
fpkvdw On

I resolved the issue by using the TRACE_EVENT() macro (see details in this LWN article) instead of DECLARE_TRACE(). I can now see the tracepoint in perf list and tplist outputs.

Thanks to @Qeole for the insight that led to the resolution.