DTrace asm profiler for Mac OS X
Aleksey Shipilev
shade at redhat.com
Wed Jan 17 12:20:47 UTC 2018
On 01/14/2018 04:24 PM, Vsevolod Tolstopyatov wrote:
> I have limited access to different versions of Mac OS X, but it seems that in some minor updates
> DTrace works with SIP enabled.
> So as solution I'd suggest to check SIP status on profiler start (via "csrutil status") and print
> warning if it's enabled or just clarify it in javadoc. It's up to Alexey to decide what approach is
> preferable in JMH
So, perf* profiler print warning messages when then number of samples is suspiciously low. I think
dtraceasm profiler should do the same, and clearly say what the user is supposed to do:
WARNING: The perf event count is suspiciously low (" + sum + "). The performance data might be
inaccurate or misleading. Try to do the profiling again, or tune up the sampling frequency.
With some profilers on Mac OS X, System Integrity Protection (SIP) may prevent profiling.
In such case, temporarily disabling SIP with 'csrutil disable' might help.
I'll add this to the patch myself.
I can push this without my own testing, hoping that external people validated this. OpenJDK rules
require the patch to be hosted on OpenJDK infra to get accepted, so, Vsevolod, can you please post
the recent version of the patch inline here?
Thanks
-Aleksey
More information about the jmh-dev
mailing list