JIT_EVENT_EXCEPTION_OCCURRED, // An exception occurred.
// The exception handler will be executed by compiled method mb
// EventSpecificData is the methodblock structure pointer mb
// EventSpecificData2 is the exception frame stack pointer
// shutdown
JVM_EVENT_SHUTDOWN, // Program exiting, mode flags must be non-zero, otherwise not sent
// EventSpecificData is NA
// JIT profiling
JIT_EVENT_METHOD_COMPILED, // issued after method code jitted
// into memory but before code is executed
// EventSpecificData is the methodblock structure pointer mb
JIT_EVENT_METHOD_UNLOAD_START, // issued before unload. Jitted method code is no
// longer being executed, but code and info
// are still in memory. The JVTune profiler
// may capture method code and info at this point.
// EventSpecificData is the methodblock structure pointer mb
// Method Profiling
JVM_EVENT_ENTER_METHOD, // issued when an interpreted method is about to be executed
// EventSpecificData is the methodblock structure pointer mb
JVM_EVENT_LEAVE_METHOD, // issued when an interpreted method is about to be left
// EventSpecificData is the methodblock structure pointer mb
JIT_EVENT_ENTER_METHOD, // issued when a jitted method is about to be executed
// EventSpecificData is the methodblock structure pointer mb
JIT_EVENT_ENTER_METHOD_XFRAME, // issued when a jitted method containing an exception frame is about to be executed
// EventSpecificData is the methodblock structure pointer mb
// EventSpecificData2 is the exception frame stack pointer
JIT_EVENT_LEAVE_METHOD, // issued when a jitted method is about to be left
// EventSpecificData is the methodblock structure pointer mb
JIT_EVENT_LEAVE_METHOD_XFRAME, // issued when a jitted method containing an exception frame is about to be left
// EventSpecificData is the methodblock structure pointer mb
// EventSpecificData2 is the exception frame stack pointer
} JVTune_Event;
typedef enum _JVTune_ModeFlags
{
JVTUNE_NO_NOTIFICATIONS = 0x0000, // dummy
JVTUNE_BE_NOTIFIED_ON_COMPILE = 0x0001, // when turned on the jit must call JVTune_NotifyEvent( JIT_EVENT_METHOD_COMPILED, ...) after a method is jitted
// no notification for already jitted methods
JVTUNE_BE_NOTIFIED_ON_UNLOAD = 0x0002, // when turned on the jit must call JVTune_NotifyEvent( JIT_EVENT_METHOD_UNLOAD_START, ...) before a method is unloaded
JVTUNE_BE_NOTIFIED_ON_METHOD_ENTRY = 0x0004, // when turned on the jit/vm must call JVTune_NotifyEvent( Jxx_EVENT_ENTER_METHOD, ...) before a method is executed
// also controls Jxx_EVENT_EXCEPTION_OCCURRED
JVTUNE_BE_NOTIFIED_ON_METHOD_EXIT = 0x0008, // when turned on the jit/vm must call JVTune_NotifyEvent( Jxx_EVENT_LEAVE_METHOD, ...) before a method terminates
// also controls Jxx_EVENT_EXCEPTION_OCCURRED
} JVTune_ModeFlags;
typedef void (*JVTune_ModeChanged)(void *UserData, JVTune_ModeFlags Flags); // called when the settings are changed with new settings
// methods
// call back function registration ... needed for profiling.
// The Method pointed by NewModeCallBackFunc will be called upon a change of state
extern void (*p_JVTune_RegisterCallback)(
void *UserData, // Info from the user
JVTune_ModeChanged NewModeCallBackFunc); // The new mode call back routine
// An event is occuring in the JIT Compiler or Java VM
extern int (*p_JVTune_NotifyEvent)(
JVTune_Event event_type, // the event that occured
void *EventSpecificData); // Data for that event, or NULL if no data
extern int (*p_JVTune_NotifyEvent2)(
JVTune_Event event_type, // the event that occured
void *EventSpecificData, // Data for that event, or NULL if no data
void *EventSpecificData2); // Data for that event, or NULL if no data