< prev index next >

test/jdk/jdk/jfr/jcmd/TestJcmdDump.java

Print this page
rev 51054 : imported patch 9000013-aixDisableJFR-requires.patch


  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.jfr.jcmd;
  27 
  28 import java.io.File;
  29 import java.nio.file.Files;
  30 import java.util.ArrayList;
  31 import java.util.List;
  32 import java.util.function.Predicate;
  33 
  34 import jdk.jfr.Event;
  35 import jdk.jfr.Recording;
  36 import jdk.jfr.consumer.RecordedEvent;
  37 import jdk.jfr.consumer.RecordingFile;
  38 import jdk.test.lib.jfr.EventNames;
  39 import jdk.test.lib.process.OutputAnalyzer;
  40 
  41 /*
  42  * @test
  43  * @summary The test verifies JFR.dump command
  44  * @key jfr

  45  * @library /test/lib /test/jdk
  46  * @run main/othervm -XX:FlightRecorderOptions:maxchunksize=1M jdk.jfr.jcmd.TestJcmdDump
  47  */
  48 public class TestJcmdDump {
  49 
  50     static class StoppedEvent extends Event {
  51     }
  52     static class RunningEvent extends Event {
  53     }
  54 
  55     private static final String[] names = { null, "r1" };
  56     private static final boolean booleanValues[] = { true, false };
  57 
  58     public static void main(String[] args) throws Exception {
  59 
  60         // Create a stopped recording in the repository to complicate things
  61         Recording r = new Recording();
  62         r.start();
  63         StoppedEvent de = new StoppedEvent();
  64         de.commit();




  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.jfr.jcmd;
  27 
  28 import java.io.File;
  29 import java.nio.file.Files;
  30 import java.util.ArrayList;
  31 import java.util.List;
  32 import java.util.function.Predicate;
  33 
  34 import jdk.jfr.Event;
  35 import jdk.jfr.Recording;
  36 import jdk.jfr.consumer.RecordedEvent;
  37 import jdk.jfr.consumer.RecordingFile;
  38 import jdk.test.lib.jfr.EventNames;
  39 import jdk.test.lib.process.OutputAnalyzer;
  40 
  41 /**
  42  * @test
  43  * @summary The test verifies JFR.dump command
  44  * @key jfr
  45  * @requires vm.hasJFR
  46  * @library /test/lib /test/jdk
  47  * @run main/othervm -XX:FlightRecorderOptions:maxchunksize=1M jdk.jfr.jcmd.TestJcmdDump
  48  */
  49 public class TestJcmdDump {
  50 
  51     static class StoppedEvent extends Event {
  52     }
  53     static class RunningEvent extends Event {
  54     }
  55 
  56     private static final String[] names = { null, "r1" };
  57     private static final boolean booleanValues[] = { true, false };
  58 
  59     public static void main(String[] args) throws Exception {
  60 
  61         // Create a stopped recording in the repository to complicate things
  62         Recording r = new Recording();
  63         r.start();
  64         StoppedEvent de = new StoppedEvent();
  65         de.commit();


< prev index next >