< prev index next >

test/jtreg-ext/requires/VMProps.java

Print this page
rev 50225 : PPC64: Fix jtreg RTM tests after "8203305: Improve TM detection for enabling RTM on Linux / POWER9"


 243 
 244         if (Platform.isAix()) {
 245             // Actually, this works since AIX 7.1.3.30, but os.version property
 246             // is set to 7.1.
 247             isRTMOS = (Platform.getOsVersionMajor()  > 7) ||
 248                       (Platform.getOsVersionMajor() == 7 && Platform.getOsVersionMinor() > 1);
 249 
 250         } else if (Platform.isLinux()) {
 251             if (Platform.isPPC()) {
 252                 isRTMOS = (Platform.getOsVersionMajor()  > 4) ||
 253                           (Platform.getOsVersionMajor() == 4 && Platform.getOsVersionMinor() > 1);
 254             }
 255         }
 256         return "" + isRTMOS;
 257     }
 258 
 259     /**
 260      * @return true if VM runs RTM supported CPU and false otherwise.
 261      */
 262     protected String vmRTMCPU() {
 263         boolean vmRTMCPU = (Platform.isPPC() ? CPUInfo.hasFeature("tcheck") : CPUInfo.hasFeature("rtm"));
 264 
 265         return "" + vmRTMCPU;
 266     }
 267 
 268     /**
 269      * @return true if VM supports AOT and false otherwise
 270      */
 271     protected String vmAOT() {
 272         // builds with aot have jaotc in <JDK>/bin
 273         Path bin = Paths.get(System.getProperty("java.home"))
 274                         .resolve("bin");
 275         Path jaotc;
 276         if (Platform.isWindows()) {
 277             jaotc = bin.resolve("jaotc.exe");
 278         } else {
 279             jaotc = bin.resolve("jaotc");
 280         }
 281         return "" + Files.exists(jaotc);
 282     }
 283 
 284     /**
 285      * Check for CDS support.




 243 
 244         if (Platform.isAix()) {
 245             // Actually, this works since AIX 7.1.3.30, but os.version property
 246             // is set to 7.1.
 247             isRTMOS = (Platform.getOsVersionMajor()  > 7) ||
 248                       (Platform.getOsVersionMajor() == 7 && Platform.getOsVersionMinor() > 1);
 249 
 250         } else if (Platform.isLinux()) {
 251             if (Platform.isPPC()) {
 252                 isRTMOS = (Platform.getOsVersionMajor()  > 4) ||
 253                           (Platform.getOsVersionMajor() == 4 && Platform.getOsVersionMinor() > 1);
 254             }
 255         }
 256         return "" + isRTMOS;
 257     }
 258 
 259     /**
 260      * @return true if VM runs RTM supported CPU and false otherwise.
 261      */
 262     protected String vmRTMCPU() {
 263         return "" + CPUInfo.hasFeature("rtm");


 264     }
 265 
 266     /**
 267      * @return true if VM supports AOT and false otherwise
 268      */
 269     protected String vmAOT() {
 270         // builds with aot have jaotc in <JDK>/bin
 271         Path bin = Paths.get(System.getProperty("java.home"))
 272                         .resolve("bin");
 273         Path jaotc;
 274         if (Platform.isWindows()) {
 275             jaotc = bin.resolve("jaotc.exe");
 276         } else {
 277             jaotc = bin.resolve("jaotc");
 278         }
 279         return "" + Files.exists(jaotc);
 280     }
 281 
 282     /**
 283      * Check for CDS support.


< prev index next >