< prev index next >

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

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


  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package jdk.jfr.api.consumer;
  26 
  27 import static jdk.test.lib.Asserts.assertNotNull;
  28 
  29 import java.util.List;
  30 
  31 import jdk.jfr.Recording;
  32 import jdk.jfr.consumer.RecordedClass;
  33 import jdk.jfr.consumer.RecordedEvent;
  34 import jdk.jfr.consumer.RecordedFrame;
  35 import jdk.jfr.consumer.RecordedMethod;
  36 import jdk.jfr.consumer.RecordedStackTrace;
  37 import jdk.test.lib.Asserts;
  38 import jdk.test.lib.jfr.Events;
  39 import jdk.test.lib.jfr.SimpleEvent;
  40 
  41 
  42 /*
  43  * @test
  44  * @key jfr

  45  * @library /test/lib
  46  * @run main/othervm -Xint jdk.jfr.api.consumer.TestMethodGetModifiers
  47  */
  48 public final class TestMethodGetModifiers {
  49 
  50     public static void main(String[] args) throws Throwable {
  51         Recording recording = new Recording();
  52         recording.start();
  53 
  54         SimpleEvent ev = new SimpleEvent();
  55         ev.commit();
  56         recording.stop();
  57 
  58         List<RecordedEvent> recordedEvents = Events.fromRecording(recording);
  59         Events.hasEvents(recordedEvents);
  60         RecordedEvent recordedEvent = recordedEvents.get(0);
  61 
  62         System.out.println("recorded event:" + recordedEvent);
  63 
  64         RecordedStackTrace stacktrace = recordedEvent.getStackTrace();


  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package jdk.jfr.api.consumer;
  26 
  27 import static jdk.test.lib.Asserts.assertNotNull;
  28 
  29 import java.util.List;
  30 
  31 import jdk.jfr.Recording;
  32 import jdk.jfr.consumer.RecordedClass;
  33 import jdk.jfr.consumer.RecordedEvent;
  34 import jdk.jfr.consumer.RecordedFrame;
  35 import jdk.jfr.consumer.RecordedMethod;
  36 import jdk.jfr.consumer.RecordedStackTrace;
  37 import jdk.test.lib.Asserts;
  38 import jdk.test.lib.jfr.Events;
  39 import jdk.test.lib.jfr.SimpleEvent;
  40 
  41 
  42 /**
  43  * @test
  44  * @key jfr
  45  * @requires vm.hasJFR
  46  * @library /test/lib
  47  * @run main/othervm -Xint jdk.jfr.api.consumer.TestMethodGetModifiers
  48  */
  49 public final class TestMethodGetModifiers {
  50 
  51     public static void main(String[] args) throws Throwable {
  52         Recording recording = new Recording();
  53         recording.start();
  54 
  55         SimpleEvent ev = new SimpleEvent();
  56         ev.commit();
  57         recording.stop();
  58 
  59         List<RecordedEvent> recordedEvents = Events.fromRecording(recording);
  60         Events.hasEvents(recordedEvents);
  61         RecordedEvent recordedEvent = recordedEvents.get(0);
  62 
  63         System.out.println("recorded event:" + recordedEvent);
  64 
  65         RecordedStackTrace stacktrace = recordedEvent.getStackTrace();
< prev index next >