5–7 Oct 2026
Europe/Prague timezone

Bridging perf and ftrace: Converting perf.data Tracepoint Events to trace.dat for KernelShark Visualization

Not scheduled
20m
Tracing MC Tracing MC

Speakers

Madhavan Srinivasan Steven Rostedt Tanushree Shah

Description

The Linux kernel tracing ecosystem comprises two complementary toolchains: perf for statistical profiling and performance analysis, and ftrace/trace-cmd for event timeline visualization. While perf captures comprehensive performance data with minimal overhead, understanding temporal relationships and event sequences remains challenging through its native interfaces. In contrast, KernelShark provides powerful graphical insights but traditionally requires separate trace-cmd recordings. Since perf record already captures tracepoint events alongside other performance metrics, running multiple commands to obtain both statistical and timeline data is redundant in production or embedded environments.

The tracefs system allows for fast flexible tracing of events. Not only is it designed for speed (around 100 nanoseconds per event), it also has a fully functional filtering system and a way to build on events via probes and synthetic events.

Allowing perf events to be injected into the tracefs ring buffer with these filters can allow for things like seeing how many cache misses happen between schedule switch events. Perf data could be recorded at any event and even filtered based on the value of the event fields.

There is a Proof of Concept patch set that does this but the interface is very poor. This session will be about the best way to create the interface to allow perf events to be injected into tracefs ring buffers.

This discussion will be about both moving perf events into trace.dat files as well as being able to inject perf events directly into the tracefs ring buffer.

Authors

Co-author

Presentation materials

There are no materials yet.