Line number in Google Perftools CPU profiler on MacOSX

前端 未结 2 762
无人共我
无人共我 2021-02-01 08:20

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 fla

2条回答
  •  不知归路
    2021-02-01 08:58

    This seems to be related to the address space layout randomization (ASLR) introduced in OS X 10.5

    I've filed issue #562 on the gperftools issue tracker. You can disable ASLR by passing -Wl,-no_pie.

    Also, if you're not bound to use gperftools, Instruments (comes with Xcode) is worth a try.

提交回复
热议问题