libtracefs: Add tracefs_load_cmdlines() API

While writing a program using the libtracefs routines, I had to load the
tep handle before tracing to see what events were available before
starting the trace. Loading the mappings of pids to comms is best done
after the trace as the saved_cmdlines file gets filled by the trace. Since
the loading was already done at the beginning, I needed a way to load it
again when the trace was over.

Add tracefs_load_cmdlines() API to be able to accomplish this.

Link: https://lore.kernel.org/linux-trace-devel/20210409214000.5f9dc904@oasis.local.home

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