< prev index next >

test/jdk/jdk/jfr/api/consumer/TestRecordedEvent.java

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


  20  *
  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.api.consumer;
  27 
  28 import java.util.List;
  29 
  30 import jdk.jfr.Description;
  31 import jdk.jfr.Event;
  32 import jdk.jfr.Recording;
  33 import jdk.jfr.ValueDescriptor;
  34 import jdk.jfr.consumer.RecordedClass;
  35 import jdk.jfr.consumer.RecordedClassLoader;
  36 import jdk.jfr.consumer.RecordedEvent;
  37 import jdk.test.lib.Asserts;
  38 import jdk.test.lib.jfr.Events;
  39 
  40 /*
  41  * @test
  42  * @summary Verifies the methods of the RecordedEvent
  43  * @key jfr

  44  * @library /test/lib
  45  * @run main/othervm jdk.jfr.api.consumer.TestRecordedEvent
  46  */
  47 public class TestRecordedEvent {
  48 
  49     static class MyClass {
  50     }
  51 
  52     static class TestEvent extends Event {
  53 
  54         @Description("MyField")
  55         Class<?> clzField = String.class;
  56         int intField;
  57         String stringField = "myString";
  58         Class<?> myClass = MyClass.class;
  59     }
  60 
  61     public static void main(String[] args) throws Throwable {
  62         Recording r = new Recording();
  63         r.start();




  20  *
  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.api.consumer;
  27 
  28 import java.util.List;
  29 
  30 import jdk.jfr.Description;
  31 import jdk.jfr.Event;
  32 import jdk.jfr.Recording;
  33 import jdk.jfr.ValueDescriptor;
  34 import jdk.jfr.consumer.RecordedClass;
  35 import jdk.jfr.consumer.RecordedClassLoader;
  36 import jdk.jfr.consumer.RecordedEvent;
  37 import jdk.test.lib.Asserts;
  38 import jdk.test.lib.jfr.Events;
  39 
  40 /**
  41  * @test
  42  * @summary Verifies the methods of the RecordedEvent
  43  * @key jfr
  44  * @requires vm.hasJFR
  45  * @library /test/lib
  46  * @run main/othervm jdk.jfr.api.consumer.TestRecordedEvent
  47  */
  48 public class TestRecordedEvent {
  49 
  50     static class MyClass {
  51     }
  52 
  53     static class TestEvent extends Event {
  54 
  55         @Description("MyField")
  56         Class<?> clzField = String.class;
  57         int intField;
  58         String stringField = "myString";
  59         Class<?> myClass = MyClass.class;
  60     }
  61 
  62     public static void main(String[] args) throws Throwable {
  63         Recording r = new Recording();
  64         r.start();


< prev index next >