< prev index next >

test/jdk/jdk/jfr/api/consumer/TestValueDescriptorRecorded.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.Label;
  33 import jdk.jfr.Recording;
  34 import jdk.jfr.ValueDescriptor;
  35 import jdk.jfr.consumer.RecordedEvent;
  36 import jdk.test.lib.Asserts;
  37 import jdk.test.lib.jfr.Events;
  38 
  39 
  40 /*
  41  * @test
  42  * @summary Verifies that the recorded value descriptors are correct
  43  * @key jfr

  44  * @library /test/lib
  45  * @run main/othervm  jdk.jfr.api.consumer.TestValueDescriptorRecorded
  46  */
  47 public class TestValueDescriptorRecorded {
  48 
  49     private static class MyEvent extends Event {
  50 
  51         @Label("myLabel")
  52         @Description("myDescription")
  53         int myValue;
  54     }
  55 
  56     public static void main(String[] args) throws Throwable {
  57         Recording r = new Recording();
  58         r.enable(MyEvent.class).withoutStackTrace();
  59         r.start();
  60         MyEvent event = new MyEvent();
  61         event.commit();
  62         r.stop();
  63 


  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.Label;
  33 import jdk.jfr.Recording;
  34 import jdk.jfr.ValueDescriptor;
  35 import jdk.jfr.consumer.RecordedEvent;
  36 import jdk.test.lib.Asserts;
  37 import jdk.test.lib.jfr.Events;
  38 
  39 
  40 /**
  41  * @test
  42  * @summary Verifies that the recorded value descriptors are correct
  43  * @key jfr
  44  * @requires vm.hasJFR
  45  * @library /test/lib
  46  * @run main/othervm  jdk.jfr.api.consumer.TestValueDescriptorRecorded
  47  */
  48 public class TestValueDescriptorRecorded {
  49 
  50     private static class MyEvent extends Event {
  51 
  52         @Label("myLabel")
  53         @Description("myDescription")
  54         int myValue;
  55     }
  56 
  57     public static void main(String[] args) throws Throwable {
  58         Recording r = new Recording();
  59         r.enable(MyEvent.class).withoutStackTrace();
  60         r.start();
  61         MyEvent event = new MyEvent();
  62         event.commit();
  63         r.stop();
  64 
< prev index next >