From: Kefu Chai Date: Wed, 30 Aug 2017 04:14:37 +0000 (+0800) Subject: doc/dev/perf: add doc on disabling -fomit-frame-pointer X-Git-Tag: v13.0.1~1114^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F17358%2Fhead;p=ceph.git doc/dev/perf: add doc on disabling -fomit-frame-pointer Signed-off-by: Kefu Chai --- diff --git a/doc/dev/perf.rst b/doc/dev/perf.rst index 5e42255a6e28..57742eec4ca0 100644 --- a/doc/dev/perf.rst +++ b/doc/dev/perf.rst @@ -20,6 +20,22 @@ To view by callee (where you can see who calls each top function):: :note: If the caller/callee views look the same you may be suffering from a kernel bug; upgrade to 4.8 or later. +Common Issues +------------- + +Ceph use `RelWithDebInfo` as its default `CMAKE_BUILD_TYPE`. Hence `-O2 -g` is +used to compile the tree in this case. And the `-O2` optimization level +enables `-fomit-frame-pointer` by default. But this prevents stack profilers +from accessing the complete stack information. So one can disable this option +when launching `cmake` :: + + cmake -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer" + +or when building the tree:: + + make CMAKE_CXX_FLAGS="-fno-omit-frame-pointer" + + Flamegraphs -----------