Call stack in the perf profiler

erezz picture erezz · Aug 28, 2012 · Viewed 35.6k times · Source

I'm running "perf" in the following way:

perf record -a --call-graph -p some_pid

perf report --call-graph --stdio

Then, I see this:

 1.60%     my_binary  my_binary                [.] my_func
           |
           --- my_func
              |          
              |--71.10%-- (nil)
              |          (nil)
              |          
               --28.90%-- 0x17f310000000a

I can't see which functions call my_func(). I see "nil" and "0x17f310000000a" instead. Am I doing something wrong? It is probably not a debug info problem because some symbols are shown while others are not shown.

More info:

  • I'm runnning CentOS 6.2 (kernel 2.6.32-220.4.1).
  • perf rpm - perf-2.6.32-279.5.2.el6.x86_64.

Answer

Andriy picture Andriy · Nov 15, 2012

Make sure you compiled the code with -fno-omit-frame-pointer gcc option.