Java – -XX :+PrintTenuringDistribution not printing the tenuring age

-XX :+PrintTenuringDistribution not printing the tenuring age… here is a solution to the problem.

-XX :+PrintTenuringDistribution not printing the tenuring age

The -XX:+PrintTenuringDistribution VM option should force the VM to print object ages in survivor space, such as described in the VMOptions page

However, when I set this option, I only see the threshold printed for each GC, not the tenuring age information.

Q: Does anyone know why this option doesn’t work?

Full list of My VM options:

-XX:+PrintTenuringDistribution -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput 
-XX:LogFile=jvm.log -server  -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC  
-Xloggc:bin/gc.log -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -showversion 
-XX:+PrintClassHistogramBeforeFullGC -XX:+PrintClassHistogramAfterFullGC 
-XX:+UseParallelOldGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=15 
-XX:NewRatio=2 -XX:InitialSurvivorRatio=3 -XX:SurvivorRatio=3 -XX:TargetSurvivorRatio=90 
-Xms8g -Xmx8g -XX:PermSize=512m -Xss256k -XX:MaxPermSize=512m -XX:+UseLargePages 
-XX:+AggressiveOpts -server -XX:-UseBiasedLocking

My version of Java is:

java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)

Solution

This is added to the Parallel Scavenge collector (-XX:+UseParallelGC)
In JVM 6.0 (Mustang) Build 55.

(From .) https://community.oracle.com/thread/1543414?start=0&tstart=0 reviews of

).

I’m using “1.6.0_26” and I’m confirming that I have the same behavior.
To confirm the previous claim, I tried the serial garbage collector (-XX:+UseSerialGC) and correctly displayed the tenuring age information.

2014-02-14T16:04:03.285-0500: 686.879: [GC 686.880: [DefNew
Desired survivor size 13402112 bytes, new threshold 15 (max 15)
- age   1:    1288856 bytes,    1288856 total
- age   2:     320312 bytes,    1609168 total
- age   3:       9816 bytes,    1618984 total
- age   4:      33352 bytes,    1652336 total
- age   5:       6256 bytes,    1658592 total
- age   6:      34464 bytes,    1693056 total
- age   7:       9128 bytes,    1702184 total
- age   8:     100192 bytes,    1802376 total
- age   9:       9024 bytes,    1811400 total
- age  10:      55632 bytes,    1867032 total
- age  11:      14616 bytes,    1881648 total
- age  12:     302304 bytes,    2183952 total
- age  13:     682192 bytes,    2866144 total
- age  14:      11928 bytes,    2878072 total
- age  15:      13928 bytes,    2892000 total

Related Problems and Solutions