6 sudo perf top -p `pidof ceph-osd`
8 To capture some data with call graphs::
10 sudo perf record -p `pidof ceph-osd` -F 99 --call-graph dwarf -- sleep 60
12 To view by caller (where you can see what each top function calls)::
14 sudo perf report --call-graph caller
16 To view by callee (where you can see who calls each top function)::
18 sudo perf report --call-graph callee
20 :note: If the caller/callee views look the same you may be
21 suffering from a kernel bug; upgrade to 4.8 or later.
26 First, get things set up::
29 git clone https://github.com/brendangregg/FlameGraph
31 Run ceph, then record some perf data::
33 sudo perf record -p `pidof ceph-osd` -F 99 --call-graph dwarf -- sleep 60
35 Then generate the flamegraph::
37 sudo perf script | ~/src/FlameGraph/stackcollapse-perf.pl > /tmp/folded
38 ~/src/FlameGraph/flamegraph.pl /tmp/folded > /tmp/perf.svg