test/jtreg-ext/requires/VMProps.java
changeset 49630 2f1b308b4469
parent 49344 e55d7a31cfa7
child 50320 df02866807b6
--- a/test/jtreg-ext/requires/VMProps.java	Wed Mar 28 11:38:47 2018 +0200
+++ b/test/jtreg-ext/requires/VMProps.java	Wed Mar 28 11:38:47 2018 +0200
@@ -228,13 +228,9 @@
      *    User either set G1 explicitely (-XX:+UseG1GC) or did not set any GC
      * @param map - property-value pairs
      */
-    protected void vmGC(Map<String, String> map){
-        GC currentGC = GC.current();
-        boolean isByErgo = GC.currentSetByErgo();
-        List<GC> supportedGC = GC.allSupported();
+    protected void vmGC(Map<String, String> map) {
         for (GC gc: GC.values()) {
-            boolean isSupported = supportedGC.contains(gc);
-            boolean isAcceptable = isSupported && (gc == currentGC || isByErgo);
+            boolean isAcceptable = gc.isSupported() && (gc.isSelected() || GC.isSelectedErgonomically());
             map.put("vm.gc." + gc.name(), "" + isAcceptable);
         }
     }