compile.h File Reference


Classes

struct  Compilation_Handle
struct  Stub_Override_Entry
struct  DynamicCode

Typedefs

typedef char * Emitter_Handle
typedef void( Override_Generator )(Emitter_Handle, Method *)
 Support for stub override code sequences.
typedef unsigned( Override_Size )(Method *)
typedef void(*) MethodInstrumentationProc (CodeChunkInfo *callee)
 Method instrumentation support.

Enumerations

enum  VM_Code_Type { VM_TYPE_JAVA, VM_TYPE_UNKNOWN }

Functions

void vm_add_jit (JIT *jit)
void vm_delete_all_jits ()
void compile_protect_arguments (Method_Handle method, GcFrame *gc)
 Protect arguments from GC.
void compile_flush_generated_code_block (Byte *, size_t)
 Code has been generated by writing it to memory.
void compile_flush_generated_code ()
JIT_Result compile_do_compilation_jit (Method *method, JIT *jit)
 Execution manager uses this method to call back to VM to compile a method using a specific JIT.
NativeCodePtr compile_gen_compile_me (Method_Handle method)
 Generate a stub in JIT calling convention to pass call compile_me() on the first method invocation.
NativeCodePtr compile_me (Method *method)
 A function to call on the first method invocation.
void patch_code_with_threads_suspended (Byte *code_block, Byte *new_code, size_t size)
Global_Envcompile_handle_to_environment (Compile_Handle)
NativeCodePtr compile_create_lil_jni_stub (Method_Handle method, void *func, NativeStubOverride nso)
 Create a LIL stub for JNI interfacing.
NativeCodePtr interpreter_compile_create_lil_jni_stub (Method_Handle method, void *func, NativeStubOverride nso)
 Create a LIL stub for JNI interfacing.
NativeCodePtr compile_create_lil_pinvoke_stub (Method_Handle method, void *func, NativeStubOverride nso)
 Create a LIL stub for PINVOKE interfacing.
bool needs_override (Method *)
NativeCodePtr compile_do_instrumentation (CodeChunkInfo *callee, MethodInstrumentationProc instr_proc)
 Interpose on calls to the specified method by calling the instr_proc.
void count_method_calls (CodeChunkInfo *callee)
 A MethodInstrumentationProc that records the number of calls from the caller code chunk to the callee.
DynamicCodecompile_get_dynamic_code_list (void)
 Adding dynamic generated code info to global list.
void compile_add_dynamic_generated_code_chunk (const char *name, bool free_name, const void *address, size_t length)
 Adding dynamic generated code info to global list.
void compile_clear_dynamic_code_list (DynamicCode *list)
static VM_Code_Type vm_identify_eip (void *addr)
 Quick inline to call EM lookup and find a compiled method type.

Variables

JIT * jit_compilers []
Stub_Override_Entrystub_override_entries
 Points to an an array of override entries with sizeof_stub_override_entries entries.
int sizeof_stub_override_entries


Typedef Documentation

typedef char* Emitter_Handle

typedef void( Override_Generator)(Emitter_Handle, Method *)

Support for stub override code sequences.

typedef unsigned( Override_Size)(Method *)

typedef void(*) MethodInstrumentationProc(CodeChunkInfo *callee)

Method instrumentation support.

Type of the instrumentation procedures called before invoking methods.


Enumeration Type Documentation

enum VM_Code_Type

Enumerator:
VM_TYPE_JAVA 
VM_TYPE_UNKNOWN 


Function Documentation

void vm_add_jit ( JIT *  jit  ) 

void vm_delete_all_jits (  ) 

void compile_protect_arguments ( Method_Handle  method,
GcFrame *  gc 
)

Protect arguments from GC.

The arguments are those passed to the last M2nFrame. The given method's signature describes what arguments were passed.

void compile_flush_generated_code_block ( Byte *  ,
size_t   
)

Code has been generated by writing it to memory.

Ensure that it is visible to all instruction fetchers. The first function flushes a particular block of code, another should be called after all blocks are flushed.

void compile_flush_generated_code (  ) 

JIT_Result compile_do_compilation_jit ( Method *  method,
JIT *  jit 
)

Execution manager uses this method to call back to VM to compile a method using a specific JIT.

NativeCodePtr compile_gen_compile_me ( Method_Handle  method  ) 

Generate a stub in JIT calling convention to pass call compile_me() on the first method invocation.

NativeCodePtr compile_me ( Method *  method  ) 

A function to call on the first method invocation.

Returns:
an entry point of successfully compiled method
Exceptions:
an exception otherwise

void patch_code_with_threads_suspended ( Byte *  code_block,
Byte *  new_code,
size_t  size 
)

Global_Env* compile_handle_to_environment ( Compile_Handle   ) 

NativeCodePtr compile_create_lil_jni_stub ( Method_Handle  method,
void *  func,
NativeStubOverride  nso 
)

Create a LIL stub for JNI interfacing.

NativeCodePtr interpreter_compile_create_lil_jni_stub ( Method_Handle  method,
void *  func,
NativeStubOverride  nso 
)

Create a LIL stub for JNI interfacing.

NativeCodePtr compile_create_lil_pinvoke_stub ( Method_Handle  method,
void *  func,
NativeStubOverride  nso 
)

Create a LIL stub for PINVOKE interfacing.

bool needs_override ( Method *   ) 

NativeCodePtr compile_do_instrumentation ( CodeChunkInfo *  callee,
MethodInstrumentationProc  instr_proc 
)

Interpose on calls to the specified method by calling the instr_proc.

void count_method_calls ( CodeChunkInfo *  callee  ) 

A MethodInstrumentationProc that records the number of calls from the caller code chunk to the callee.

DynamicCode* compile_get_dynamic_code_list ( void   ) 

Adding dynamic generated code info to global list.

Is used in JVMTI and native frames interface

void compile_add_dynamic_generated_code_chunk ( const char *  name,
bool  free_name,
const void *  address,
size_t  length 
)

Adding dynamic generated code info to global list.

void compile_clear_dynamic_code_list ( DynamicCode list  ) 

static VM_Code_Type vm_identify_eip ( void *  addr  )  [static]

Quick inline to call EM lookup and find a compiled method type.


Variable Documentation

JIT* jit_compilers[]

Stub_Override_Entry* stub_override_entries

Points to an an array of override entries with sizeof_stub_override_entries entries.

int sizeof_stub_override_entries


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

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