-
Book Overview & Buying
-
Table Of Contents
Oracle JRockit: The Definitive Guide
There is a simple Java API that can be used to contribute custom events to flight recordings. It is located under the package com.oracle.jrockit.jfr and is distributed as part of the JRockit JDK. It is located in the JRockit rt.jar.
The com.oracle.jrockit.jfr API is under development, and not currently supported outside Oracle. Some internal Oracle products, like WebLogic Server already use it to plug into JRockit Flight Recorder.
To create a custom event using the API, first decide what kind of event is needed. You may recall from the start of this chapter that there are four main event types. Depending on what kind of event is needed, a different event class will need to be extended. There are four different ones, each corresponding to a different kind of event:
com.oracle.jrockit.jfr.InstantEvent
com.oracle.jrockit.jfr.DurationEvent
com.oracle.jrockit.jfr.TimedEvent
com.oracle.jrockit.jfr.RequestableEvent
Events can also be created dynamically, which will be...
Change the font size
Change margin width
Change background colour