running `df_all_events` without executing `trace-cmd` separately for each event
Created by: Avidanborisov
I'm trying to use lisa to conveniently parse all the events from a trace.dat file into a DataFrame, with additional columns from the event arguments (such as func
from funcgraph_entry
/funcgraph_exit
) to appear on the DataFrame. Here's an example -
import lisa.trace.Trace
t = lisa.trace.Trace("trace.dat")
df = t.df_all_events(fields_as_cols=["__cpu", "__comm", "__pid", "func"])
Running this on a trace.dat file with ~2 million events and ~14 different kinds of events takes a good few minutes to complete. I've noticed that a separate trace-cmd
process is getting executed for each event separately (with an -r event_name
argument), and an additional initial invocation with no events at all.
Is there a way to parse all events together with a single trace-cmd
invocation, thus reducing time for this to complete?
Thanks!