It would be nice to add some unit/regression test cases of some sort.
David http://codereview.appspot.com/5851044/diff/1/callgraph.c File callgraph.c (right): http://codereview.appspot.com/5851044/diff/1/callgraph.c#newcode309 callgraph.c:309: if (!is_prefix_of ("_ZL", name)) How about static functions in namespace? How about functions in anonymous namespace? http://codereview.appspot.com/5851044/diff/1/callgraph.c#newcode511 callgraph.c:511: ".text." }; How are the sections ordered in the array? Keep it in mind that it is possible to encode the actual profile count of the function in the section name in the future. http://codereview.appspot.com/5851044/