ee_em_intf.h File Reference


Detailed Description

JIT interface exposed to EM.

A just-in-time compiler must implement the given functions to enable EM initialization and de-initialization of JIT compilers or to enable profile collection or profile usage in JIT.


Typedefs

typedef void *(*) vm_adaptor_t (const char *name)

Functions

JITEXPORT void JIT_init (JIT_Handle jit, const char *name, vm_adaptor_t adaptor)
 Initializes JIT.
JITEXPORT void JIT_deinit (JIT_Handle jit)
 De-initializes JIT.
JITEXPORT void JIT_set_profile_access_interface (JIT_Handle jit, EM_Handle em, struct EM_ProfileAccessInterface *pc_interface)
 Sets the profile access interface to JIT.
JITEXPORT bool JIT_enable_profiling (JIT_Handle jit, PC_Handle pc, EM_JIT_PC_Role role)
 Requests JIT to enable profiling of the specified type.
JITEXPORT void JIT_profile_notification_callback (JIT_Handle jit, PC_Handle pc, Method_Handle mh)
 Notifies JIT that profile is collected.


Typedef Documentation

typedef void*(*) vm_adaptor_t(const char *name)


Function Documentation

JITEXPORT void JIT_init ( JIT_Handle  jit,
const char *  name,
vm_adaptor_t  adaptor 
)

Initializes JIT.

The given method is called only once per JIT instance.

Parameters:
[in] jit - the run-time JIT handle used at run-time to refer to the given JIT instance
[in] name - the persistent JIT name that the compiler uses to separate its configuration settings from the ones of other JITs

JITEXPORT void JIT_deinit ( JIT_Handle  jit  ) 

De-initializes JIT.

The given method is called only once per JIT during the system shutdown.

Parameters:
[in] jit - the handle of JIT to de-initialize
Note:
The given method is optional.

JITEXPORT void JIT_set_profile_access_interface ( JIT_Handle  jit,
EM_Handle  em,
struct EM_ProfileAccessInterface *  pc_interface 
)

Sets the profile access interface to JIT.

The EM passes the pointer to the profile access interface to JIT through the given method.

Parameters:
[in] jit - the JIT instance to pass the profile access interface to
[in] em - the handle to the EM instance
[in] pc_interface - the handle to the profile access interface
Note:
The given method is optional. A JIT compiler without profiling support does not need this method.

JITEXPORT bool JIT_enable_profiling ( JIT_Handle  jit,
PC_Handle  pc,
EM_JIT_PC_Role  role 
)

Requests JIT to enable profiling of the specified type.

EM uses the given method to request JIT to enable profile collection or profile usage. According to the EM request JIT uses or collects the profile defined by the role parameter. The profile type and the profile collector are defined by the profile collector handle.

Parameters:
[in] jit - the JIT instance
[in] pc - the handle of the profile collector instance
[in] role - the role of JIT in profiling defining whether to collect or to use the profile
Returns:
TRUE if JIT does profiling of the pc type according to the role parameter; FALSE if profiling is not supported.
Note:
The given method is optional. A JIT compiler without profiling support does not need this method.

JITEXPORT void JIT_profile_notification_callback ( JIT_Handle  jit,
PC_Handle  pc,
Method_Handle  mh 
)

Notifies JIT that profile is collected.

EM uses this method to notify JIT that profile is collected. JIT could use this information to patch profiling counters.

Parameters:
[in] jit - the JIT instance handle
[in] pc - the handle of the profile collector instance
[in] mh - the handle of the method with collected profile
Note:
The given method is optional. Currently only JET supports this method.


Genereated on Tue Mar 11 19:25:39 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.