test/hotspot/jtreg/runtime/appcds/CDSandJFR.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Sdiff test/hotspot/jtreg/runtime/appcds

test/hotspot/jtreg/runtime/appcds/CDSandJFR.java

Print this page




  57         test(classes);
  58     }
  59 
  60     static void test(String[] classes) throws Exception {
  61         String appJar = ClassFileInstaller.getJarPath("CDSandJFR.jar");
  62         OutputAnalyzer output;
  63         output = TestCommon.testDump(appJar, TestCommon.list(classes));
  64         TestCommon.checkDump(output, "Skipping JFR event class jdk/jfr/");
  65 
  66         output = TestCommon.exec(appJar,
  67                                  "-XX:StartFlightRecording=dumponexit=true",
  68                                  "Hello");
  69         TestCommon.checkExec(output, "Hello World");
  70 
  71         TestCommon.checkExec(TestCommon.exec(appJar,
  72                                              "-XX:FlightRecorderOptions=retransform=true",
  73                                              "GetFlightRecorder"));
  74         TestCommon.checkExec(TestCommon.exec(appJar,
  75                                              "-XX:FlightRecorderOptions=retransform=false",
  76                                              "GetFlightRecorder"));











  77     }
  78 }


  57         test(classes);
  58     }
  59 
  60     static void test(String[] classes) throws Exception {
  61         String appJar = ClassFileInstaller.getJarPath("CDSandJFR.jar");
  62         OutputAnalyzer output;
  63         output = TestCommon.testDump(appJar, TestCommon.list(classes));
  64         TestCommon.checkDump(output, "Skipping JFR event class jdk/jfr/");
  65 
  66         output = TestCommon.exec(appJar,
  67                                  "-XX:StartFlightRecording=dumponexit=true",
  68                                  "Hello");
  69         TestCommon.checkExec(output, "Hello World");
  70 
  71         TestCommon.checkExec(TestCommon.exec(appJar,
  72                                              "-XX:FlightRecorderOptions=retransform=true",
  73                                              "GetFlightRecorder"));
  74         TestCommon.checkExec(TestCommon.exec(appJar,
  75                                              "-XX:FlightRecorderOptions=retransform=false",
  76                                              "GetFlightRecorder"));
  77 
  78         // Test dumping with flight recorder enabled.
  79         output = TestCommon.testDump(appJar, TestCommon.list(classes),
  80                                      "-XX:StartFlightRecording=dumponexit=true");
  81         TestCommon.checkDump(output, "Skipping JFR event class jdk/jfr/");
  82         TestCommon.checkDump(output, "Skipping redefined class");
  83         // Test running with the archive generated with flight recorder enabled.
  84         output = TestCommon.exec(appJar,
  85                                  "-XX:StartFlightRecording=dumponexit=true",
  86                                  "Hello");
  87         TestCommon.checkExec(output, "Hello World");
  88     }
  89 }
test/hotspot/jtreg/runtime/appcds/CDSandJFR.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File