# 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
Walk through perf file and output contents of each record
perf script > out.perf