4 ms·
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.
by tbrock 11y ago
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.
- mtklein 11y agoLast time I profiled Go code on a Mac, I just ran my binary as normal under Instruments. Seemed to work fine.
- nkozyra 11y agoYou can definitely do this on OSX.
- zero_iq 11y agoTo 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 http://godoc.org/rsc.io/pprof_mac_fix
- deleted 11y ago[deleted]
- cespare 11y agoIt'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-135591685 https://github.com/golang/go/issues/6047#issuecomment-135591...
- Spiritus 11y agoSomeone 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...