Java Code Examples for jdk.jfr.FlightRecorder#getEventTypes()
The following examples show how to use
jdk.jfr.FlightRecorder#getEventTypes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestEventTypes.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { FlightRecorderMXBean bean = JmxHelper.getFlighteRecorderMXBean(); FlightRecorder jfr = FlightRecorder.getFlightRecorder(); Recording r = new Recording(); r.enable(MyEvent.class); new MyEvent(); // triggers <clinit> List<EventTypeInfo> infos = bean.getEventTypes(); List<EventType> types = jfr.getEventTypes(); Asserts.assertFalse(infos.isEmpty(), "No EventTypeInfos found"); verifyMyEventType(infos); assertSame(infos, types); r.close(); }
Example 2
Source File: GCEventAll.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private void enableAllGcEvents(Recording recording) { FlightRecorder flightrecorder = FlightRecorder.getFlightRecorder(); for (EventType et : flightrecorder.getEventTypes()) { if (EventNames.isGcEvent(et)) { recording.enable(et.getName()); System.out.println("Enabled GC event: " + et.getName()); } } System.out.println("All GC events enabled"); }
Example 3
Source File: GCEventAll.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private void enableAllGcEvents(Recording recording) { FlightRecorder flightrecorder = FlightRecorder.getFlightRecorder(); for (EventType et : flightrecorder.getEventTypes()) { if (EventNames.isGcEvent(et)) { recording.enable(et.getName()); System.out.println("Enabled GC event: " + et.getName()); } } System.out.println("All GC events enabled"); }
Example 4
Source File: TestEventTypes.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { FlightRecorderMXBean bean = JmxHelper.getFlighteRecorderMXBean(); FlightRecorder jfr = FlightRecorder.getFlightRecorder(); Recording r = new Recording(); r.enable(MyEvent.class); new MyEvent(); // triggers <clinit> List<EventTypeInfo> infos = bean.getEventTypes(); List<EventType> types = jfr.getEventTypes(); Asserts.assertFalse(infos.isEmpty(), "No EventTypeInfos found"); verifyMyEventType(infos); assertSame(infos, types); r.close(); }
Example 5
Source File: GCEventAll.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private void enableAllGcEvents(Recording recording) { FlightRecorder flightrecorder = FlightRecorder.getFlightRecorder(); for (EventType et : flightrecorder.getEventTypes()) { if (EventNames.isGcEvent(et)) { recording.enable(et.getName()); System.out.println("Enabled GC event: " + et.getName()); } } System.out.println("All GC events enabled"); }
Example 6
Source File: TestEventTypes.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { FlightRecorderMXBean bean = JmxHelper.getFlighteRecorderMXBean(); FlightRecorder jfr = FlightRecorder.getFlightRecorder(); Recording r = new Recording(); r.enable(MyEvent.class); new MyEvent(); // triggers <clinit> List<EventTypeInfo> infos = bean.getEventTypes(); List<EventType> types = jfr.getEventTypes(); Asserts.assertFalse(infos.isEmpty(), "No EventTypeInfos found"); verifyMyEventType(infos); assertSame(infos, types); r.close(); }
Example 7
Source File: GCEventAll.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private void enableAllGcEvents(Recording recording) { FlightRecorder flightrecorder = FlightRecorder.getFlightRecorder(); for (EventType et : flightrecorder.getEventTypes()) { if (EventNames.isGcEvent(et)) { recording.enable(et.getName()); System.out.println("Enabled GC event: " + et.getName()); } } System.out.println("All GC events enabled"); }