libtracefs: Add tracefs_load_headers() API

Sometimes the only thing that is needed from the tracefs directory is how to
parse the sub-buffers. The tracefs_fill_local_events() has a lot of overhead
as it reads pretty much everything. But if the only thing needed is the
header file parsing, add this helper function to do it.

Link: https://lore.kernel.org/linux-trace-devel/20231228215433.54854-17-rostedt@goodmis.org

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
5 files changed