test/jtreg-ext/requires/VMProps.java
changeset 50320 df02866807b6
parent 49630 2f1b308b4469
child 50339 ede65c4fb6da
--- a/test/jtreg-ext/requires/VMProps.java	Thu May 31 15:11:57 2018 +0530
+++ b/test/jtreg-ext/requires/VMProps.java	Thu May 31 10:41:36 2018 +0200
@@ -80,6 +80,7 @@
         map.put("vm.graal.enabled", isGraalEnabled());
         map.put("docker.support", dockerSupport());
         vmGC(map); // vm.gc.X = true/false
+        vmOptFinalFlags(map);
 
         VMProps.dump(map);
         return map;
@@ -236,6 +237,25 @@
     }
 
     /**
+     * Selected final flag.
+     * @param map - property-value pairs
+     * @param flagName - flag name
+     */
+    private void vmOptFinalFlag(Map<String, String> map, String flagName) {
+        String value = WB.getBooleanVMFlag(flagName) ? "true" : "false";
+        map.put("vm.opt.final." + flagName, value);
+    }
+
+    /**
+     * Selected sets of final flags.
+     * @param map -property-value pairs
+     */
+    protected void vmOptFinalFlags(Map<String, String> map) {
+        vmOptFinalFlag(map, "ClassUnloading");
+        vmOptFinalFlag(map, "UseCompressedOops");
+    }
+
+    /**
      * @return true if VM runs RTM supported OS and false otherwise.
      */
     protected String vmRTMOS() {