Questions on bug JDK-8061611 "Remove deprecated command line flags"

Derek White derek.white at
Mon Nov 10 22:43:47 UTC 2014

I'm tackling a "starter bug" JDK-8061611 
<> " Remove deprecated 
command line flags" that sounds like it should be pretty trivial, but 
some part of this reveal some unexpectedly twisted behavior. I guess 
that makes it the perfect starter GC bug :-)

One of the command line flags to remove is 
-XX:CMSParPromoteBlocksToClaim. It has been deprecated for a while. 
Using it prints the message
     "Please use -XX:OldPLABSize in place of 
-XX:CMSParPromoteBlocksToClaim in the future"

Two little twists:
1) The variable CMSParPromoteBlocksToClaim is still used separately from 
OldPLABSize when initializing the "_blocks_to_claim" array in 
compactibleFreeListSpace.cpp. It looks like it uses it when calculating 
the initial averages for AdaptiveWeightedAverage. Is it important to 
retain the ability to set the variable CMSParPromoteBlocksToClaim 
separately from OldPLABSize? And see last question***.

2) In the CMS case, there is code that attempts to synchronize the 
OldPLABSize and CMSParPromoteBlocksToClaim variables in 
Arguments::set_cms_and_parnew_gc_flags(). If OldPLABSize is set (via 
command line or ergo), then CMSParPromoteBlocksToClaim is set to the 
same value unless it is already set too. Then in any case OldPLABSize is 
set to CMSParPromoteBlocksToClaim.

But note the default values:

    OldPLABSize = 1024
    CMSParPromoteBlocksToClaim = 16

So if both OldPLABSize and CMSParPromoteBlocksToClaim were left at 
default values, then OldPLABSize just got set to 16, which seems way too 
small to be useful. Not only is the OldPLABSize default 1024, but in 
set_parnew_gc_flags() we just reset the value to 1024 (again). So this 
seems pretty intentional, and setting to 16 seems accidental.This sounds 

$  java -XX:+UseConcMarkSweepGC -XX:+PrintFlagsFinal -version | grep 
     uintx OldPLABSize                              := 16              

In fact, I don't see why the "Size of old gen promotion LAB's (in 
HeapWords)" should be equal to "Number of blocks to attempt to claim 
when refilling CMS LAB". *** Aren't these different units?

Thanks for any thoughts,

- Derek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the hotspot-gc-dev mailing list