Back{: .button}
# Record performance
perf record -g <your program>
# Sample every 100 Hz
perf record -F 100 <prog>
# Performance Report
perf report -g
# Performance Report
# graph - type of call graph: normalize percentage used to adjacent frame
# 0.5 - filter percentage
# caller - invert call order of the graph
perf report -g 'graph,0.5,caller'
# fractal - percentages are relative to parent
perf report -g 'fractal,0.5,caller'
perf report -g 'graph,0.5,caller' -F+srcline,period
perf report -g --percent-limit 4
-grecord call stack- Compile your program with
-fno-omit-frame-pointer
- Compile your program with
a- switch to compiled ASM- while in ASM window
sfor source code,kfor line number hfor help
Walk through perf file and output contents of each record
perf script > out.perf