-XX:+PrintTenuringDistribution not printing the tenuring age

garbage-collection, java, jvm

Solution

This was added to the Parallel Scavenge collector (-XX:+UseParallelGC) in jvm 6.0(mustang) build 55.

(From a comment on https://community.oracle.com/thread/1543414?start=0&tstart=0)

I am using "1.6.0_26" and I confirm that I have the same behavior. To confirm the previous statement, I tried the serial garbage collector (-XX:+UseSerialGC) and tenuring age information is displayed correctly.

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

Problem

The -XX:+PrintTenuringDistribution VM option should force the VM to print object ages in the survivor spaces, as noted in the VMOptions page. However, when I set this option, I see only the threshold value being printed for each GC, not the tenuring age information. Q: Does anyone know why this option is not working? The 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 Java version 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) ```

Original source