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)
Loading
Please register or sign in to comment