cpuprofiler icon indicating copy to clipboard operation
cpuprofiler copied to clipboard

No function names in results (on OS X)

Open holdenmatt opened this issue 8 years ago • 3 comments

Hi!

I'm trying to get this working on OS X 10.11.6. It seems to build and work, but no function names are included in the results. Everything is collapsed under mandelbrot as a single entry (see below).

Any way to use this on OS X, or is it Linux only?

Thanks!

Matts-MacBook-Pro:mandelbrot holden$ go tool pprof target/debug/mandelbrot cpu.prof
Local symbolization failed for libsystem_platform.dylib: open /usr/lib/system/libsystem_platform.dylib: unrecognized object file
Local symbolization failed for libsystem_m.dylib: open /usr/lib/system/libsystem_m.dylib: unrecognized object file
Local symbolization failed for libdyld.dylib: open /usr/lib/system/libdyld.dylib: unrecognized object file
Entering interactive mode (type "help" for commands)
(pprof) top 10
6.92s of 6.92s total (  100%)
      flat  flat%   sum%        cum   cum%
     6.60s 95.38% 95.38%      6.91s 99.86%  [mandelbrot]
     0.31s  4.48% 99.86%      0.32s  4.62%  [libsystem_m.dylib]
     0.01s  0.14%   100%      0.50s  7.23%  [libsystem_platform.dylib]
         0     0%   100%      5.47s 79.05%
         0     0%   100%      5.47s 79.05%  [libdyld.dylib]
         0     0%   100%      0.21s  3.03%  [libprofiler.0.dylib]

holdenmatt avatar Dec 31 '16 22:12 holdenmatt

I haven't tested myself but it looks like there is some mention of OS X in the install docs. I'm afraid that is all the help I can offer - if you do figure it out feel free to open a PR in this repo to add details!

Good luck!

AtheMathmo avatar Jan 01 '17 15:01 AtheMathmo

FWIW this is still happening on OS X 10.13.3 (17D102).

dbkaplun avatar Apr 01 '18 15:04 dbkaplun

FYI, you can use Xcode to profile. It works out of the box.

Follow these instructions to open Instruments. Then start a Counters profiler in Instruments to see a detailed stack profile for your application. (And all other programs running on the system!)

dbkaplun avatar Apr 01 '18 17:04 dbkaplun