Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was so disappointed when I realized I couldn't profile on OSX without a kernel patch. I wonder if there is any path towards enabling that in the future.


It's a kernel bug that was reported to Apple years ago.

Fortunately, it seems that it might finally be fixed in El Capitan:

https://github.com/golang/go/issues/6047#issuecomment-135591...


Someone over at r/golang said that it might not be necessary to patch the kernel in OS X 10.11 (El Capitan). Haven't verified it myself though...


Last time I profiled Go code on a Mac, I just ran my binary as normal under Instruments. Seemed to work fine.


You can definitely do this on OSX.


To be fair, that's not always been the case. Last time I tried the profiler under OS X, it all seemed to work, but the actual figures produced by the profiler were nonsense. Other platforms seemed unaffected. That was quite a while ago. If they've fixed it, then great.

EDIT: It seems a kernel patch is required to get it to work correctly on the Mac: http://godoc.org/rsc.io/pprof_mac_fix




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: