How can I profile C code running on Linux? - Stack Overflow
You may have multiple performance problems of different sizes. There are profilers now that sample the stack, even on wall-clock time, but what comes out is measurements or hot path, The standard solution would be to profile with gprof. I& 39;d suggest do a micro bench mark google benchmark is a good place to start.