Skip to content
Commit e6327e1a authored by Douglas Raillard's avatar Douglas Raillard
Browse files

perf: Use perf script to parse traces

To compile perf binary for the target:
$ cd kerneltree/tools/perf
$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j8 'LDFLAGS=-static'

To record perf.data file:
$ perf record --event 'sched:*' --overwrite -o perf.data

note: --overwrite allows to only use the ring buffer and avoids perf to
wakeup to flush the data to disk. It only does it once at the end when
interrupted or on SIGUSR2.

To parse the trace using LISA:

from lisa.trace import Trace
trace_path = 'perf.data'
trace = Trace(trace_path, events=['sched_wakeup'])
df = trace.df_events('sched_wakeup')
print(df)
parent b739ada1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment