CACAO
Functions
Hook Namespace Reference

Hook points are inline functions acting as probes scattered throughout several VM subsystems. More...

Functions

void breakpoint (Breakpoint *bp)
 
bool class_linked (classinfo *c)
 
void class_loaded (classinfo *c)
 
void jit_generated (methodinfo *m, codeinfo *code)
 Hook point just after code was generated. More...
 
void jit_recycled (methodinfo *m, codeinfo *code)
 
void method_enter (methodinfo *m)
 
void method_exit (methodinfo *m)
 
void method_unwind (methodinfo *m)
 
void native_resolved (methodinfo *m, void *symbol, void **symbolptr)
 
void thread_start (threadobject *t)
 
void thread_end (threadobject *t)
 
void vm_init ()
 Hook point after the VM is initialized. More...
 
void vm_preinit ()
 Hook point before the VM is initialized. More...
 
void vm_shutdown ()
 Hook point before the VM is actually destroyed. More...
 
bool class_linked_dynoffsets (classinfo *c)
 

Detailed Description

Hook points are inline functions acting as probes scattered throughout several VM subsystems.

They can be used to implement event generation or statistics gathering without polluting the source code. Hence all compiler macro and runtime checks should be done in this file. One example of where hooks are useful is JVMTI event firing.

Function Documentation

void Hook::breakpoint ( Breakpoint bp)
inline

Definition at line 70 of file hook.hpp.

bool Hook::class_linked ( classinfo c)
inline

Definition at line 81 of file hook.hpp.

bool Hook::class_linked_dynoffsets ( classinfo c)

Definition at line 32 of file hook.cpp.

void Hook::class_loaded ( classinfo c)
inline

Definition at line 89 of file hook.hpp.

void Hook::jit_generated ( methodinfo m,
codeinfo code 
)
inline

Hook point just after code was generated.

Note that one method can have multiple code realizations, the hook is fired for each of them. The code was not yet executed.

Parameters
mThe method for which code was generated.
codeThe fully initialized codeinfo for the generated code.

Definition at line 102 of file hook.hpp.

void Hook::jit_recycled ( methodinfo m,
codeinfo code 
)
void Hook::method_enter ( methodinfo m)
inline

Definition at line 110 of file hook.hpp.

void Hook::method_exit ( methodinfo m)
inline

Definition at line 115 of file hook.hpp.

void Hook::method_unwind ( methodinfo m)
inline

Definition at line 120 of file hook.hpp.

void Hook::native_resolved ( methodinfo m,
void symbol,
void **  symbolptr 
)
inline

Definition at line 125 of file hook.hpp.

void Hook::thread_end ( threadobject t)
inline

Definition at line 135 of file hook.hpp.

void Hook::thread_start ( threadobject t)
inline

Definition at line 130 of file hook.hpp.

void Hook::vm_init ( )
inline

Hook point after the VM is initialized.

At this point the VM is fully operating and ready to execute Java code. Final intializations and thread startup should be done here.

Definition at line 145 of file hook.hpp.

void Hook::vm_preinit ( )
inline

Hook point before the VM is initialized.

At this point the VM can not yet execute Java code but some central native subsystems are initialized. Only basic initialization steps should be done here.

Definition at line 155 of file hook.hpp.

void Hook::vm_shutdown ( )
inline

Hook point before the VM is actually destroyed.

At this point the VM is still running, but all non-daemon threads have terminated and resources are ready to be reclaimed. Final cleanup tasks should be done here.

Definition at line 168 of file hook.hpp.