< prev index next >

test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java

Print this page




 222             try {
 223                 recursiveCall();
 224             } catch (StackOverflowError e) {
 225             }
 226             decounter--;
 227             if (decounter == 0) {
 228                 setupSOEFrame = counter;
 229                 testStartFrame = counter - deframe;
 230                 test.run();
 231             }
 232         }
 233     }
 234 
 235     private static boolean isAlwaysSupportedPlatform() {
 236         // Note: To date Aarch64 is the only platform that we don't statically
 237         // know if it supports the reserved stack area. This is because the
 238         // open Aarch64 port supports it and the Oracle arm64 port does not.
 239         return Platform.isAix() ||
 240             (Platform.isLinux() &&
 241              (Platform.isPPC() || Platform.isS390x() || Platform.isX64() ||
 242               Platform.isX86())) ||
 243             Platform.isOSX() ||
 244             Platform.isSolaris();
 245     }
 246 
 247     private static boolean isNeverSupportedPlatform() {
 248         return !isAlwaysSupportedPlatform() && !Platform.isAArch64();
 249     }
 250 
 251     private static boolean isSupportedPlatform;
 252 
 253     private static void initIsSupportedPlatform() throws Exception {
 254         // In order to dynamicaly determine if the platform supports the reserved
 255         // stack area, run with -XX:StackReservedPages=1 and see if we get the
 256         // expected warning message for platforms that don't support it.
 257         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:StackReservedPages=1", "-version");
 258         OutputAnalyzer output = new OutputAnalyzer(pb.start());
 259         System.out.println("StackReservedPages=1 log: [" + output.getOutput() + "]");
 260         if (output.getExitValue() != 0) {
 261             String msg = "Could not launch with -XX:StackReservedPages=1: exit " + output.getExitValue();
 262             System.err.println("FAILED: " + msg);




 222             try {
 223                 recursiveCall();
 224             } catch (StackOverflowError e) {
 225             }
 226             decounter--;
 227             if (decounter == 0) {
 228                 setupSOEFrame = counter;
 229                 testStartFrame = counter - deframe;
 230                 test.run();
 231             }
 232         }
 233     }
 234 
 235     private static boolean isAlwaysSupportedPlatform() {
 236         // Note: To date Aarch64 is the only platform that we don't statically
 237         // know if it supports the reserved stack area. This is because the
 238         // open Aarch64 port supports it and the Oracle arm64 port does not.
 239         return Platform.isAix() ||
 240             (Platform.isLinux() &&
 241              (Platform.isPPC() || Platform.isS390x() || Platform.isX64() ||
 242               Platform.isX86()) || Platform.isARM()) ||
 243             Platform.isOSX() ||
 244             Platform.isSolaris();
 245     }
 246 
 247     private static boolean isNeverSupportedPlatform() {
 248         return !isAlwaysSupportedPlatform() && !Platform.isAArch64();
 249     }
 250 
 251     private static boolean isSupportedPlatform;
 252 
 253     private static void initIsSupportedPlatform() throws Exception {
 254         // In order to dynamicaly determine if the platform supports the reserved
 255         // stack area, run with -XX:StackReservedPages=1 and see if we get the
 256         // expected warning message for platforms that don't support it.
 257         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:StackReservedPages=1", "-version");
 258         OutputAnalyzer output = new OutputAnalyzer(pb.start());
 259         System.out.println("StackReservedPages=1 log: [" + output.getOutput() + "]");
 260         if (output.getExitValue() != 0) {
 261             String msg = "Could not launch with -XX:StackReservedPages=1: exit " + output.getExitValue();
 262             System.err.println("FAILED: " + msg);


< prev index next >