Line number in Google Perftools CPU profiler on MacOSX
I am trying to profile some C++ programs on MacOSX. So I built google-perftools , wrote a program, compiled using MacPorts g++ 4.7, with -g compiler flag, and linked to libprofiler . Then I ran: CPUPROFILE=cpu.profile ./a.out Then I ran pprof to generate the output: [hidden ~]$ pprof --text ./a.out cpu.profile Using local file ./a.out. Using local file cpu.profile. Removing __sigtramp from all stack traces. Total: 282 samples 107 37.9% 37.9% 107 37.9% 0x000000010d72229e 16 5.7% 43.6% 16 5.7% 0x000000010d721a5f 12 4.3% 47.9% 12 4.3% 0x000000010d721de8 11 3.9% 51.8% 11 3.9% 0x000000010d721a4e 9