< prev index next >

test/jtreg-ext/requires/VMProps.java

Print this page




 245         }
 246     }
 247 
 248     /**
 249      * Selected final flag.
 250      * @param map - property-value pairs
 251      * @param flagName - flag name
 252      */
 253     private void vmOptFinalFlag(Map<String, String> map, String flagName) {
 254         String value = WB.getBooleanVMFlag(flagName) ? "true" : "false";
 255         map.put("vm.opt.final." + flagName, value);
 256     }
 257 
 258     /**
 259      * Selected sets of final flags.
 260      * @param map -property-value pairs
 261      */
 262     protected void vmOptFinalFlags(Map<String, String> map) {
 263         vmOptFinalFlag(map, "ClassUnloading");
 264         vmOptFinalFlag(map, "UseCompressedOops");

 265     }
 266 
 267     /**
 268      * @return "true" if VM has a serviceability agent.
 269      */
 270     protected String vmHasSA() {
 271         return "" + Platform.hasSA();
 272     }
 273 
 274     /**
 275      * @return "true" if VM has a serviceability agent and it can
 276      * attach to the VM.
 277      */
 278     protected String vmHasSAandCanAttach() {
 279         try {
 280             return "" + Platform.shouldSAAttach();
 281         } catch (IOException e) {
 282             System.out.println("Checking whether SA can attach to the VM failed.");
 283             e.printStackTrace();
 284             // Run the tests anyways.




 245         }
 246     }
 247 
 248     /**
 249      * Selected final flag.
 250      * @param map - property-value pairs
 251      * @param flagName - flag name
 252      */
 253     private void vmOptFinalFlag(Map<String, String> map, String flagName) {
 254         String value = WB.getBooleanVMFlag(flagName) ? "true" : "false";
 255         map.put("vm.opt.final." + flagName, value);
 256     }
 257 
 258     /**
 259      * Selected sets of final flags.
 260      * @param map -property-value pairs
 261      */
 262     protected void vmOptFinalFlags(Map<String, String> map) {
 263         vmOptFinalFlag(map, "ClassUnloading");
 264         vmOptFinalFlag(map, "UseCompressedOops");
 265         vmOptFinalFlag(map, "UseCompressedClassPointers");
 266     }
 267 
 268     /**
 269      * @return "true" if VM has a serviceability agent.
 270      */
 271     protected String vmHasSA() {
 272         return "" + Platform.hasSA();
 273     }
 274 
 275     /**
 276      * @return "true" if VM has a serviceability agent and it can
 277      * attach to the VM.
 278      */
 279     protected String vmHasSAandCanAttach() {
 280         try {
 281             return "" + Platform.shouldSAAttach();
 282         } catch (IOException e) {
 283             System.out.println("Checking whether SA can attach to the VM failed.");
 284             e.printStackTrace();
 285             // Run the tests anyways.


< prev index next >