Search code examples
graphcallgprof

Gprof missing caller in call graph


I'm trying to profile a c++ algorithm. The result shows a function covering more than 40% of the overall time. However, it seems to have no caller in graph generated with gprof2dot. Moreover the error seems to be confirmed by the generated txt output. Under "name" columns it is written "". How can I solve it? I'm working with OpenCV libraries on Ubuntu. I compile with the following options: -g -pg -static-libgcc


Solution

  • Gprof is sampling based profiler: https://en.wikipedia.org/wiki/Gprof.
    Try this uftrace for tracing the function call graph for your application.