test/runtime/Safepoint/AssertSafepointCheckConsistency1.java

Print this page




  30  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  31  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  32  * @run main AssertSafepointCheckConsistency1
  33  */
  34 
  35 import com.oracle.java.testlibrary.*;
  36 
  37 import sun.hotspot.WhiteBox;
  38 
  39 public class AssertSafepointCheckConsistency1 {
  40     public static void main(String args[]) throws Exception {
  41         if (args.length > 0) {
  42             WhiteBox.getWhiteBox().assertMatchingSafepointCalls(true, true);
  43         }
  44         if (Platform.isDebugBuild()){
  45             ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
  46                   "-Xbootclasspath/a:.",
  47                   "-XX:+UnlockDiagnosticVMOptions",
  48                   "-XX:+WhiteBoxAPI",
  49                   "-XX:-TransmitErrorReport",
  50                   "-XX:-CreateMinidumpOnCrash",
  51                   "-Xmx32m",
  52                   "AssertSafepointCheckConsistency1",
  53                   "test");
  54             OutputAnalyzer output = new OutputAnalyzer(pb.start());
  55             output.shouldContain("assert").shouldContain("always");
  56         }
  57     }
  58 }


  30  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  31  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  32  * @run main AssertSafepointCheckConsistency1
  33  */
  34 
  35 import com.oracle.java.testlibrary.*;
  36 
  37 import sun.hotspot.WhiteBox;
  38 
  39 public class AssertSafepointCheckConsistency1 {
  40     public static void main(String args[]) throws Exception {
  41         if (args.length > 0) {
  42             WhiteBox.getWhiteBox().assertMatchingSafepointCalls(true, true);
  43         }
  44         if (Platform.isDebugBuild()){
  45             ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
  46                   "-Xbootclasspath/a:.",
  47                   "-XX:+UnlockDiagnosticVMOptions",
  48                   "-XX:+WhiteBoxAPI",
  49                   "-XX:-TransmitErrorReport",
  50                   "-XX:-CreateCoredumpOnCrash",
  51                   "-Xmx32m",
  52                   "AssertSafepointCheckConsistency1",
  53                   "test");
  54             OutputAnalyzer output = new OutputAnalyzer(pb.start());
  55             output.shouldContain("assert").shouldContain("always");
  56         }
  57     }
  58 }