I use perf to profile my application. To make interpretation of the resulting call graph easier, I partitioned my core loops using label functions like
maptable_appendRange that can be easily searched for in the call graph. Unfortunately, these functions are mostly inlined by the optimizer and therefore do not show up in the call graph.
To fix this, I can compile without optimization (
-O0) and everything is fine and profiling with my label functions is a bliss. On the other hand, optimization has quite an impact on my code's overall performance and I'm not sure if profiling without optimization will be representative of actual performance.
So here is my question: can I expect representative results when profiling unoptimized code?