Running JMH with dtraceasm profiler on macOS

Patrick Concannon patrick.concannon at oracle.com
Thu Feb 20 09:44:32 UTC 2020


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