< prev index next >

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

Print this page

 23 
 24 package jdk.jfr.jcmd;
 25 
 26 import java.io.File;
 27 import java.nio.file.Files;
 28 import java.util.ArrayList;
 29 import java.util.List;
 30 import java.util.function.Predicate;
 31 
 32 import jdk.jfr.Event;
 33 import jdk.jfr.Recording;
 34 import jdk.jfr.consumer.RecordedEvent;
 35 import jdk.jfr.consumer.RecordingFile;
 36 import jdk.test.lib.JDKToolFinder;
 37 import jdk.test.lib.jfr.EventNames;
 38 import jdk.test.lib.process.OutputAnalyzer;
 39 import jdk.test.lib.process.ProcessTools;
 40 
 41 /**
 42  * @test
 43  * @summary The test verifies JFR.dump command
 44  * @requires vm.flagless
 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     private static final long timeoutMillis = 50000;
 59 
 60     public static void main(String[] args) throws Exception {
 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();

 23 
 24 package jdk.jfr.jcmd;
 25 
 26 import java.io.File;
 27 import java.nio.file.Files;
 28 import java.util.ArrayList;
 29 import java.util.List;
 30 import java.util.function.Predicate;
 31 
 32 import jdk.jfr.Event;
 33 import jdk.jfr.Recording;
 34 import jdk.jfr.consumer.RecordedEvent;
 35 import jdk.jfr.consumer.RecordingFile;
 36 import jdk.test.lib.JDKToolFinder;
 37 import jdk.test.lib.jfr.EventNames;
 38 import jdk.test.lib.process.OutputAnalyzer;
 39 import jdk.test.lib.process.ProcessTools;
 40 
 41 /**
 42  * @test

 43  * @requires vm.flagless
 44  * @requires vm.hasJFR
 45  * @requires !(vm.opt.final.UseCompactObjectHeaders == true | vm.opt.final.UseShenandoahGC == true)
 46  * @summary The test verifies JFR.dump command
 47  * @library /test/lib /test/jdk
 48  * @run main/othervm -XX:FlightRecorderOptions:maxchunksize=1M jdk.jfr.jcmd.TestJcmdDump
 49  */
 50 public class TestJcmdDump {
 51 
 52     static class StoppedEvent extends Event {
 53     }
 54     static class RunningEvent extends Event {
 55     }
 56 
 57     private static final String[] names = { null, "r1" };
 58     private static final boolean booleanValues[] = { true, false };
 59     private static final long timeoutMillis = 50000;
 60 
 61     public static void main(String[] args) throws Exception {
 62         // Create a stopped recording in the repository to complicate things
 63         Recording r = new Recording();
 64         r.start();
 65         StoppedEvent de = new StoppedEvent();
 66         de.commit();
< prev index next >