< prev index next >

test/hotspot/jtreg/runtime/ErrorHandling/NestedThreadsListHandleInErrorHandlingTest.java

Print this page
rev 59076 : [mq]: 8243945


  21  * questions.
  22  */
  23 
  24 import java.io.BufferedReader;
  25 import java.io.File;
  26 import java.io.FileInputStream;
  27 import java.io.InputStreamReader;
  28 import java.util.regex.Pattern;
  29 
  30 import jdk.test.lib.process.OutputAnalyzer;
  31 import jdk.test.lib.Platform;
  32 import jdk.test.lib.process.ProcessTools;
  33 
  34 /*
  35  * @test
  36  * @requires (vm.debug == true)
  37  * @bug 8167108
  38  * @summary Nested ThreadsListHandle info should be in error handling output.
  39  * @modules java.base/jdk.internal.misc
  40  * @library /test/lib
  41  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+EnableThreadSMRStatistics NestedThreadsListHandleInErrorHandlingTest
  42  */
  43 
  44 /*
  45  * This test was created using SafeFetchInErrorHandlingTest.java
  46  * as a guide.
  47  */
  48 public class NestedThreadsListHandleInErrorHandlingTest {
  49   public static void main(String[] args) throws Exception {
  50 
  51     // The -XX:ErrorHandlerTest=N option requires debug bits.
  52     // Need to disable ShowRegistersOnAssert: that flag causes registers to be shown, which calls os::print_location,
  53     // which - as part of its checks - will iterate the threads list under a ThreadListHandle, changing the max nesting
  54     // counters and confusing this test.
  55     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
  56         "-XX:+UnlockDiagnosticVMOptions",
  57         "-Xmx100M",
  58         "-XX:ErrorHandlerTest=17",
  59         "-XX:-CreateCoredumpOnCrash",
  60         "-XX:-ShowRegistersOnAssert",
  61         "-version");




  21  * questions.
  22  */
  23 
  24 import java.io.BufferedReader;
  25 import java.io.File;
  26 import java.io.FileInputStream;
  27 import java.io.InputStreamReader;
  28 import java.util.regex.Pattern;
  29 
  30 import jdk.test.lib.process.OutputAnalyzer;
  31 import jdk.test.lib.Platform;
  32 import jdk.test.lib.process.ProcessTools;
  33 
  34 /*
  35  * @test
  36  * @requires (vm.debug == true)
  37  * @bug 8167108
  38  * @summary Nested ThreadsListHandle info should be in error handling output.
  39  * @modules java.base/jdk.internal.misc
  40  * @library /test/lib
  41  * @run driver NestedThreadsListHandleInErrorHandlingTest
  42  */
  43 
  44 /*
  45  * This test was created using SafeFetchInErrorHandlingTest.java
  46  * as a guide.
  47  */
  48 public class NestedThreadsListHandleInErrorHandlingTest {
  49   public static void main(String[] args) throws Exception {
  50 
  51     // The -XX:ErrorHandlerTest=N option requires debug bits.
  52     // Need to disable ShowRegistersOnAssert: that flag causes registers to be shown, which calls os::print_location,
  53     // which - as part of its checks - will iterate the threads list under a ThreadListHandle, changing the max nesting
  54     // counters and confusing this test.
  55     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
  56         "-XX:+UnlockDiagnosticVMOptions",
  57         "-Xmx100M",
  58         "-XX:ErrorHandlerTest=17",
  59         "-XX:-CreateCoredumpOnCrash",
  60         "-XX:-ShowRegistersOnAssert",
  61         "-version");


< prev index next >