I do not understand the documentation for gprof regarding how to compile your profiling program with gprof. G ++ requires compilation with the -g option (debugging information) in addition to the -pg option or not. In each case, I get different results, and I would like to see where the bottlenecks in my application are in release mode, and not in debug mode, when many optimizations are not taken into account by the compiler (for example, inlining)
profiling compilation g ++ gprof
myahya
source share