RFR: JDK-8220813: update hotspot tier1_gc tests depending on GC to use @requires vm.gc.X

Ao Qi aoqi at loongson.cn
Tue Mar 19 09:48:34 UTC 2019


Hi,

JBS: https://bugs.openjdk.java.net/browse/JDK-8220813
Webrev: http://cr.openjdk.java.net/~aoqi/8220813/webrev.00/

If a particular GC is not supported, some hotspot tier1_gc tests
fails. The patch allows tests to be skipped on platforms where a GC is
not supported.

Tested:

before (configure using --with-jvm-features):
configure          TOTAL  PASS  FAIL ERROR
default                  251   251     0     0
-cmsgc                 243   222    21     0
-epsilongc            229   229     0     0
-g1gc,-jfr              181   157    24     0
-parallelgc            241   219    22     0
-shenandoahgc    206   206     0     0
-zgc                      251   251     0     0

after (configure using --with-jvm-features):
configure          TOTAL  PASS  FAIL ERROR
default                    251   251     0     0
-cmsgc                   222   222     0     0
-epsilongc              229   229     0     0
-g1gc,-jfr                157   157     0     0
-parallelgc              219   219     0     0
-shenandoahgc      206   206     0     0
-zgc                        251   251     0     0

before:
VM_OPTIONS                         TOTAL  PASS  FAIL ERROR
default                                        251   251     0     0
-XX:+UseG1GC                         129   129     0     0
-XX:+UseSerialGC                      65    65     0     0
-XX:+UseParallelGC                   69    69     0     0
-XX:+UseConcMarkSweepGC    67    67     0     0

after:
VM_OPTIONS                         TOTAL  PASS  FAIL ERROR
default                                        251   251     0     0
-XX:+UseG1GC                         121   121     0     0
-XX:+UseSerialGC                      51    51     0     0
-XX:+UseParallelGC                   60    60     0     0
-XX:+UseConcMarkSweepGC    66    66     0     0

The difference in VM_OPTIONS tests mainly comes from two reasons:
1. This patch make this kind of change:

@requires vm.gc=="null" & !vm.graal.enabled
=>
@requires vm.gc.ConcMarkSweep & !vm.graal.enabled

Take gc/arguments/TestAlignmentToUseLargePages.java#id1 for example.
Before the patch, even if VM_OPTIONS=-XX:+UseConcMarkSweepGC is set,
gc/arguments/TestAlignmentToUseLargePages.java#id1 will not be
executed (but the test is intended to test -XX:+UseConcMarkSweepGC).
After the patch, the test will be executed if
VM_OPTIONS=-XX:+UseConcMarkSweepGC is set.

2. If a test use a particular GC in the code (not in the jtreg tag
fields) and another GC is passed by -XX:UseXGC, the test will be
skipped.
For example, gc/startup_warnings/TestG1.java uses -XX:+UseG1GC in the
main method. This test will be skipped, when
VM_OPTIONS=-XX:+UseConcMarkSweepGC is used. Before this patch, it will
be executed.

I am doing more tests and checking test results above. Could someone
give some advice on this change?

Thanks,
Ao Qi



More information about the hotspot-gc-dev mailing list