Generating callgraph diagrams with gprof2dot

suggest change

For more complex applications, flat execution profiles may be difficult to follow. This is why many profiling tools also generate some form of annotated callgraph information.

gprof2dot converts text output from many profilers (Linux perf, callgrind, oprofile, and others) into a callgraph diagram. You can use it by running your profiler (example for gprof):

# compile with profiling flags  
g++ *.cpp -pg
# run to generate profiling data                                            
./main
# translate profiling data to text, create image     
gprof ./main | gprof2dot -s | dot -Tpng -o output.png

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents