The mix of native and java code in "-prof perfasm"
Aleksey Shipilev
aleksey.shipilev at oracle.com
Thu Nov 12 21:23:22 UTC 2015
Hi Sergey,
On 11/12/2015 07:31 PM, Sergey Bylokhov wrote:
> Probably this was discussed already, but I fails to find an answer to my question.
>
> I have a benchmark which spend most of the time in the native library.
> If I run it with "-prof perfasm" but without "-XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly" I got correct result [1].
> But if I add -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly then information about the native code is missing [2]:
>
> Is it a bug or I missed some additional options? Thanks.
-prof perfasm sets its own set of options:
http://hg.openjdk.java.net/code-tools/jmh/file/bcec9a03787f/jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java#l228
...so you don't need to provide any option of yours.
It might be that providing an additional -XX:+PrintAssembly FUBARs the
method name matching logic, that is why the "wrong" output mentions the
compiled code as <unresolved>. I don't consider that a bug per se,
because you cannot generally protect from the stray output from the VM.
If you want to dig more into that, then dump the compilation log into
file with -prof perfasm:saveLog=true, and study it, or send it my way
privately.
Thanks,
-Aleksey
More information about the jmh-dev
mailing list