RFR (XXS): JDK-8022051: G1: Remove some unused G1 flags

Thomas Schatzl thomas.schatzl at oracle.com
Thu Aug 1 02:34:51 PDT 2013


Hi,

On Thu, 2013-08-01 at 10:21 +0200, Bengt Rutisson wrote:
> Hi everyone,
> 
> Could I have a couple of reviews of this really small change?
> 
> http://cr.openjdk.java.net/~brutisso/8022051/webrev.00/
> 
> It removes four develop flags that are not being used anywhere in the code.
> 
> (BTW, I promise to stop looking at the flag code now. I know I've sent 
> out three small flag changes in a short time. ;) )
> 

Looks good - keep looking :)

Btw, probably similar to you I tried to automatize the work, here's my
(linux) command line magic that checks this:

$ java -XX:+PrintFlagsFinal -version | grep "=" > flags.txt
$ for i in `cat flags.txt`; do echo -n "$i "; grep $i `find . -name
'*.?pp'` -c | grep -v ":0" | wc -l; done | grep " 1"

(The "1" is because at least one occurrence is found in the globals*.hpp
files)

(which is flawed also finds flags that are used 10-19 times, but these
are few - it's good enough (tm) :) I'm also not sure if it is
sufficient.

And it does not find other unused GC flags...

@compiler-devs (CC'ed): there seem to be unused compiler flags though,
in particular

BranchOnRegister
FenceInstruction
NewCodeParameter
OptoPrologueNops
SparcV9RegsHiBitsZero
UseLockedTracing
UseNewCode
UseNewCode2
UseNewCode3
VerifyCompiledCode

I think the UseNewCode* are handy for debugging/developing, but I am not
sure if the others are still needed.

These may be false positives though, not sure, although I checked by
grepping the sources for each of them.

Thanks for looking in this,
Thomas




More information about the hotspot-gc-dev mailing list