Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Problems with Yourkit + Java 11 + Native memory tracking

Moderators: Vladimir Kondratyev, Anton Katilin

Problems with Yourkit + Java 11 + Native memory tracking

Postby cdietrich » Wed Jul 08, 2020 1:11 pm

hi,

when i profile my app with yourkit and native memory tracking enabled i get
wrong/implausible numbers reported for the compiler memory

Total: reserved=15072248KB, committed=13810372KB
- Java Heap (reserved=12582912KB, committed=12582912KB)
(mmap: reserved=12582912KB, committed=12582912KB)
....
- Compiler (reserved=18014398509481965KB, committed=18014398509481965KB)
(malloc=195KB #2360)
(arena=18014398509481770KB #5)
...

here are the vm args i use
-XX:+UnlockDiagnosticVMOptions
-XX:+PrintNMTStatistics
-XX:NativeMemoryTracking=summary

i am on Java 11.0.7 on RHEL

is this a yourkit bug? a openjdk bug? am i holding it wrong?
unfortunately i cannot reproduce this with an arbitrary java program
and with my app only with a specific workload.

Thanks
Christian
cdietrich
 
Posts: 3
Joined: Wed Jul 08, 2020 12:55 pm

Re: Problems with Yourkit + Java 11 + Native memory tracking

Postby Anton Katilin » Thu Jul 09, 2020 9:27 am

Hi Christian

I'm sure that numbers such as 18014398509481965KB are really invalid.

These statistic messages are printed by the JVM, the profiler agent does not interfere the numbers printed out. So I believe it may be a Java bug. Although the profiler agent may somehow indirectly affect its reproducibility by e.g. using some JVMTI API functions.

Could you please try running the profiler agent with the startup option "disableall". If it helps, please try individual options or their combinations instead:
https://www.yourkit.com/docs/java/help/ ... disableall

What garbage collector settings do you use? Perhaps changing the collector can help.

If possible, please check if the problem is reproducible with the newest Java 14 instead.

Best regards,
Anton
Anton Katilin
 
Posts: 5922
Joined: Wed Aug 11, 2004 8:37 am

Re: Problems with Yourkit + Java 11 + Native memory tracking

Postby cdietrich » Thu Jul 09, 2020 10:12 am

problem does not happen with disableall.
problem happens with default GC settings too. (we have adjusted the ratio only)
problem does not happen with Java 14 (did have to set the yourkit option to disable java version check for that)
cdietrich
 
Posts: 3
Joined: Wed Jul 08, 2020 12:55 pm

Re: Problems with Yourkit + Java 11 + Native memory tracking

Postby Anton Katilin » Thu Jul 09, 2020 10:55 am

problem does not happen with disableall.

Great. Please also try the combinations
"disablealloc,disablenatives,disabletracing,probe_disable=*"
and
"disablealloc,disabletracing"

problem does not happen with Java 14 (did have to set the yourkit option to disable java version check for that)

Please consider version 2020.7 EAP, it works with Java 14 out of the box:
https://www.yourkit.com/eap/
Anton Katilin
 
Posts: 5922
Joined: Wed Aug 11, 2004 8:37 am

Re: Problems with Yourkit + Java 11 + Native memory tracking

Postby cdietrich » Thu Jul 09, 2020 11:18 am

disabletracing seems sufficient to make the problem go away
cdietrich
 
Posts: 3
Joined: Wed Jul 08, 2020 12:55 pm

Re: Problems with Yourkit + Java 11 + Native memory tracking

Postby Anton Katilin » Thu Jul 09, 2020 12:15 pm

Thank you for the feedback. "disabletracing" prevents bytecode instrumentation for CPU tracing, which apparently affects the compiler statistics. Anyway, it's great that the issue is solved in Java 14 and that there are known workarounds for Java 11.
Anton Katilin
 
Posts: 5922
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.