< prev index next >

test/jdk/jdk/jfr/cmd/TestReconstruct.java

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


  24  */
  25 
  26 package jdk.jfr.cmd;
  27 
  28 import java.io.FileWriter;
  29 import java.io.IOException;
  30 import java.nio.file.Files;
  31 import java.nio.file.Path;
  32 import java.nio.file.Paths;
  33 
  34 import jdk.jfr.Event;
  35 import jdk.jfr.Name;
  36 import jdk.jfr.Recording;
  37 import jdk.jfr.consumer.RecordedEvent;
  38 import jdk.jfr.consumer.RecordingFile;
  39 import jdk.jfr.internal.Repository;
  40 import jdk.jfr.internal.SecuritySupport.SafePath;
  41 import jdk.test.lib.Asserts;
  42 import jdk.test.lib.process.OutputAnalyzer;
  43 
  44 /*
  45  * @test
  46  * @summary Test jfr reconstruct
  47  * @key jfr

  48  * @library /test/lib /test/jdk
  49  * @modules jdk.jfr/jdk.jfr.internal
  50  * @run main/othervm jdk.jfr.cmd.TestReconstruct
  51  */
  52 public class TestReconstruct {
  53 
  54     @Name("Correlation")
  55     static class CorrelationEvent extends Event {
  56         int id;
  57     }
  58     private static int RECORDING_COUNT = 5;
  59 
  60     @SuppressWarnings("resource")
  61     public static void main(String[] args) throws Exception {
  62         // Create some disk recordings
  63         Recording[] recordings = new Recording[5];
  64         for (int i = 0; i < RECORDING_COUNT; i++) {
  65             Recording r = new Recording();
  66             r.setToDisk(true);
  67             r.start();




  24  */
  25 
  26 package jdk.jfr.cmd;
  27 
  28 import java.io.FileWriter;
  29 import java.io.IOException;
  30 import java.nio.file.Files;
  31 import java.nio.file.Path;
  32 import java.nio.file.Paths;
  33 
  34 import jdk.jfr.Event;
  35 import jdk.jfr.Name;
  36 import jdk.jfr.Recording;
  37 import jdk.jfr.consumer.RecordedEvent;
  38 import jdk.jfr.consumer.RecordingFile;
  39 import jdk.jfr.internal.Repository;
  40 import jdk.jfr.internal.SecuritySupport.SafePath;
  41 import jdk.test.lib.Asserts;
  42 import jdk.test.lib.process.OutputAnalyzer;
  43 
  44 /**
  45  * @test
  46  * @summary Test jfr reconstruct
  47  * @key jfr
  48  * @requires vm.hasJFR
  49  * @library /test/lib /test/jdk
  50  * @modules jdk.jfr/jdk.jfr.internal
  51  * @run main/othervm jdk.jfr.cmd.TestReconstruct
  52  */
  53 public class TestReconstruct {
  54 
  55     @Name("Correlation")
  56     static class CorrelationEvent extends Event {
  57         int id;
  58     }
  59     private static int RECORDING_COUNT = 5;
  60 
  61     @SuppressWarnings("resource")
  62     public static void main(String[] args) throws Exception {
  63         // Create some disk recordings
  64         Recording[] recordings = new Recording[5];
  65         for (int i = 0; i < RECORDING_COUNT; i++) {
  66             Recording r = new Recording();
  67             r.setToDisk(true);
  68             r.start();


< prev index next >