test/runtime/Safepoint/AssertSafepointCheckConsistency4.java

Print this page




  30  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  31  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  32  * @run main AssertSafepointCheckConsistency4
  33  */
  34 
  35 import com.oracle.java.testlibrary.*;
  36 
  37 import sun.hotspot.WhiteBox;
  38 
  39 public class AssertSafepointCheckConsistency4 {
  40     public static void main(String args[]) throws Exception {
  41         if (args.length > 0) {
  42             WhiteBox.getWhiteBox().assertMatchingSafepointCalls(true, false);
  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                "AssertSafepointCheckConsistency4",
  53                "test");
  54 
  55             OutputAnalyzer output = new OutputAnalyzer(pb.start());
  56             output.shouldNotContain("assert");
  57             output.shouldNotContain("never");
  58             output.shouldNotContain("always");
  59         }
  60     }
  61 }
  62 
  63 


  30  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  31  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  32  * @run main AssertSafepointCheckConsistency4
  33  */
  34 
  35 import com.oracle.java.testlibrary.*;
  36 
  37 import sun.hotspot.WhiteBox;
  38 
  39 public class AssertSafepointCheckConsistency4 {
  40     public static void main(String args[]) throws Exception {
  41         if (args.length > 0) {
  42             WhiteBox.getWhiteBox().assertMatchingSafepointCalls(true, false);
  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                "AssertSafepointCheckConsistency4",
  53                "test");
  54 
  55             OutputAnalyzer output = new OutputAnalyzer(pb.start());
  56             output.shouldNotContain("assert");
  57             output.shouldNotContain("never");
  58             output.shouldNotContain("always");
  59         }
  60     }
  61 }
  62 
  63