Have you considered using gprof? Once you have it installed (I believe most majors distros have it by default) compile your code with the '-pg' option. When you run your executable, it will generate a gmon.out file that contains profiling information including a call graph.
Have a look at this tutorial to get a better idea of how it works.