Running JMH with dtraceasm profiler on macOS

Vsevolod Tolstopyatov qwwdfsad at gmail.com
Tue Mar 24 16:30:13 UTC 2020


Hi,

Could you please specify your OS X version, JDK version (or, if it is built
from sources, revision number) and whether this problem reproduces with any
JMH benchmark or with a specific one?

Also, could you please show the output of the "csrutil status" command and
check whether the following command "sudo dtrace -n 'profile-1001 /arg1/ {
printf("%d 0x%lx %d", pid, arg1, timestamp); ufunc(arg1)}'" prints any
errors?

--
Best regards,
Tolstopyatov Vsevolod


On Thu, Feb 20, 2020 at 12:47 PM Patrick Concannon <
patrick.concannon at oracle.com> wrote:

> Hi,
>
> I am having trouble getting the dtraceasm profiler to work with JMH on
> macOS.
>
>
> I was able to build the binutils-2.30 successfully, and I see the
> expected output when I run:
>
> java -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly
>
>
> However, when I go to run JMH with MICRO="OPTIONS=-prof dtraceasm; ... I
> get the error below:
>
> # Processing profiler results: DTraceAsmProfiler Exception in thread
> "main" java.lang.IllegalStateException: []
>      at
>
> org.openjdk.jmh.profile.DTraceAsmProfiler.afterTrial(DTraceAsmProfiler.java:92)
>      at org.openjdk.jmh.runner.Runner.runSeparate(Runner.java:685)
>      at org.openjdk.jmh.runner.Runner.runBenchmarks(Runner.java:568)
>      at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:320)
>      at org.openjdk.jmh.runner.Runner.run(Runner.java:209)
>      at org.openjdk.jmh.Main.main(Main.java:71)
>
>
> I was wondering if anyone has experience setting up this profiler on
> macOS, and has encountered this error before?
>
>
> Kind regards,
>
> Patrick
>
>


More information about the jmh-dev mailing list