RFR (L): 8065972: Remove support for ParNew+SerialOld and DefNew+CMS

Bengt Rutisson bengt.rutisson at oracle.com
Wed Nov 26 12:09:39 UTC 2014


Hi everyone,

Can I have a couple of reviews for this change to remove the support for 
ParNew+SerialOld and DefNew+CMS?

This work is part of  JEP 214 (http://openjdk.java.net/jeps/214).

The main change is in the hotspot repo:
http://cr.openjdk.java.net/~brutisso/8065972/hotspot-webrev.00/

I also removed the ParNew runs from the jprt configuration:
http://cr.openjdk.java.net/~brutisso/8065972/root-webrev.00/

JBS bug:
https://bugs.openjdk.java.net/browse/JDK-8065972

Some notes about the change:

- UseParNewGC is now a redundant flag. It can only be used with CMS, so 
it will always have the same value as UseConcMarkSweepGC. Since 
UseParNewGC was not one of the flags that were deprecated in JDK 8, we 
decided to leave the flag in for JDK 9 but print a warning message that 
it is deprecated. We plan on removing UseParNewGC in JDK 10.

Here's how the VM will behave with different values of UseParNewGC after 
my change:

$ java -XX:+UseParNewGC -version
It is not possible to combine the ParNew young collector with the Serial 
old collector.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

$ java -XX:-UseParNewGC -version
Java HotSpot(TM) 64-Bit Server VM warning: The UseParNewGC flag is 
deprecated and will likely be removed in a future release
java version "1.9.0-internal-debug"
Java(TM) SE Runtime Environment (build 
1.9.0-internal-debug-brutisso_2014_11_05_09_40-b00)
Java HotSpot(TM) 64-Bit Server VM (build 
1.9.0-internal-debug-brutisso_2014_11_05_09_40-b00, mixed mode)

$ java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -version
Java HotSpot(TM) 64-Bit Server VM warning: The UseParNewGC flag is 
deprecated and will likely be removed in a future release
java version "1.9.0-internal-debug"
Java(TM) SE Runtime Environment (build 
1.9.0-internal-debug-brutisso_2014_11_05_09_40-b00)
Java HotSpot(TM) 64-Bit Server VM (build 
1.9.0-internal-debug-brutisso_2014_11_05_09_40-b00, mixed mode)

$ java -XX:-UseParNewGC -XX:+UseConcMarkSweepGC -version
It is not possible to combine the DefNew young collector with the CMS 
collector.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

- The NEW_C_HEAP_ARRAY and "new" calls in initialize_generations() 
methods will exit if they fail. No need to check for null after those 
calls. This simplified the two implementations significantly.

- At a few places I've changed from "DefNewGeneration* dng = 
(DefNewGeneration*)_young_gen;" to "DefNewGeneration* dng = 
_young_gen->as_DefNewGeneration();". The as_DefNewGeneration() method 
does the asserts that were often placed before the original casting code.

- In concurrentMarkSweepGeneration.cpp I left the casting to 
DefNewGeneration even though we could now use the more specific 
ParNewGeneration. I prefer to do such an update later (if at all) since 
that might come with its own complications regarding virtual calls etc.

- The two methods must_be_youngest() and must_be_oldest() were unused. 
Removing them was not strictly needed for this change, but seemed like a 
nice thing to do anyway and I don't think it clutters the webrev much.

- UseParNewGC is now always true when UseConcMarkSweepGC is true. And it 
is always false when UseConcMarkSweepGC is false. If statements that 
used to test against both flags have been simplified to only test 
against UseConcMarkSweepGC. This means that UseParNewGC is now only used 
in arguments.cpp

- Similarly JTreg tests that used UseParNewGC have been changed to use 
UseConcMarkSweepGC instead. This should make it easy to remove in JDK 10.

- The change to make/jprt.properties only affects the internal testing 
system we have. It will no longer test the ParNew+SerialOld combination 
(which is no longer supported). Note that DefNew+CMS was not tested at 
all by JPRT.

Thanks,
Bengt


More information about the hotspot-gc-dev mailing list