< prev index next >

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

Print this page
rev 59103 : imported patch hotspot


 220             long l20, l21, l22, l23, l24, l25, l26, l27, l28, l30, l31, l32, l33, l34, l35, l36, l37;
 221             counter++;
 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         return Platform.isAix() ||
 237             (Platform.isLinux() &&
 238              (Platform.isPPC() || Platform.isS390x() || Platform.isX64() ||
 239               Platform.isX86() || Platform.isAArch64())) ||
 240             Platform.isOSX() ||
 241             Platform.isSolaris();
 242     }
 243 
 244     private static boolean isNeverSupportedPlatform() {
 245         return !isAlwaysSupportedPlatform();
 246     }
 247 
 248     private static boolean isSupportedPlatform;
 249 
 250     private static void initIsSupportedPlatform() throws Exception {
 251         // In order to dynamicaly determine if the platform supports the reserved
 252         // stack area, run with -XX:StackReservedPages=1 and see if we get the
 253         // expected warning message for platforms that don't support it.
 254         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:StackReservedPages=1", "-version");
 255         OutputAnalyzer output = new OutputAnalyzer(pb.start());
 256         System.out.println("StackReservedPages=1 log: [" + output.getOutput() + "]");
 257         if (output.getExitValue() != 0) {
 258             String msg = "Could not launch with -XX:StackReservedPages=1: exit " + output.getExitValue();
 259             System.err.println("FAILED: " + msg);
 260             throw new RuntimeException(msg);
 261         }




 220             long l20, l21, l22, l23, l24, l25, l26, l27, l28, l30, l31, l32, l33, l34, l35, l36, l37;
 221             counter++;
 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         return Platform.isAix() ||
 237             (Platform.isLinux() &&
 238              (Platform.isPPC() || Platform.isS390x() || Platform.isX64() ||
 239               Platform.isX86() || Platform.isAArch64())) ||
 240             Platform.isOSX();

 241     }
 242 
 243     private static boolean isNeverSupportedPlatform() {
 244         return !isAlwaysSupportedPlatform();
 245     }
 246 
 247     private static boolean isSupportedPlatform;
 248 
 249     private static void initIsSupportedPlatform() throws Exception {
 250         // In order to dynamicaly determine if the platform supports the reserved
 251         // stack area, run with -XX:StackReservedPages=1 and see if we get the
 252         // expected warning message for platforms that don't support it.
 253         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:StackReservedPages=1", "-version");
 254         OutputAnalyzer output = new OutputAnalyzer(pb.start());
 255         System.out.println("StackReservedPages=1 log: [" + output.getOutput() + "]");
 256         if (output.getExitValue() != 0) {
 257             String msg = "Could not launch with -XX:StackReservedPages=1: exit " + output.getExitValue();
 258             System.err.println("FAILED: " + msg);
 259             throw new RuntimeException(msg);
 260         }


< prev index next >