How to see objects in the space of survivors

Is there any way to see which objects are in the space of the survivor. I have a situation where the survivor from space is used at 100%, but the space for survivors (before) is used at 0%. I used some profiling tools, but they do not provide memory usage. Any help is appreciated.

+4
source share
2 answers

jvisualvm should be your friend here, if he doesn't have it in his JDK, then something like this plugin might help: https://blogs.oracle.com/klc/entry/visualgc_plugin_for_visualvm

Also try: http://www.oracle.com/technetwork/java/visualgc-136680.html

enter image description here

+1
source

One of the surviving places will always be empty. This is a fundamental property of the GC algorithm used by the JVM HotSpot.

HotSpot uses a copy collector for young space (EDEN and survivors). For odd collections, EDEN + S0 are copied to S1, to even collections EDEN + S1 are copied to S0. As a result, EDEN and one of the survivors become empty. EDEN is filled with new objects later, but the survivor will remain empty until the next young collections.

See also Details on GC Pauses in the JVM, HotSpot minor GC .

0
source

Source: https://habr.com/ru/post/1501963/


All Articles