1
votes

is there a way to get the call graph generated by gprof to show the calling order of the functions?

so if I have main()->study()->sleep()->wakeup() and main()->wakeup()->study()->sleep(), the resulting call graph actually shows this difference in execution order..

Basically, I am trying to compare two C files in order to find out if there was a difference in execution order of their functions.. is there a better way to do this?

Thanks

1
Take @amdn suggestion. People think poor little gprof can work miracles. All it does is count calls between functions, sample the program counter, and do a bit of math.Mike Dunlavey

1 Answers

1
votes

If you are on Linux, you could try a tracer like LTTng

https://lttng.org/

The LTTng project aims at providing highly efficient tracing tools for Linux. Its tracers help tracking down performance issues and debugging problems involving multiple concurrent processes and threads. Tracing across multiple systems is also possible.