_OpenEmVm Struct Reference

#include <em_vm.h>

List of all members.


Detailed Description

The structure comprises all EM to VM interface methods.


Public Attributes

void(* ExecuteMethod )(jmethodID meth, jvalue *return_value, jvalue *args)
 Requests EM to execute the method.
JIT_Result(* CompileMethod )(Method_Handle method_handle)
 Requests EM to start the compilation of the method.
void(* RegisterCodeChunk )(Method_Handle method_handle, void *code_addr, size_t size, void *data)
 Registers a code chunk in EM for later possible lookup by IP in code.
Method_Handle(* LookupCodeChunk )(void *addr, Boolean is_ip_past, void **code_addr, size_t *size, void **data)
 Lookup code chunk by IP.
Boolean(* UnregisterCodeChunk )(void *addr)
 Removes registered code chunk from the lookup table.
void(* ProfilerThreadTimeout )()
 The method is used to callback EM from the profiler thread supported by VM on time-out.
void(* ClassloaderUnloadingCallback )(ClassLoaderHandle class_handle)


Member Data Documentation

void(* _OpenEmVm.ExecuteMethod)(jmethodID meth, jvalue *return_value, jvalue *args)

Requests EM to execute the method.

VM uses the given method to execute uncompiled methods. EM is responsible for selecting the appropriate execution engine and executing the method using the stub provided by the execution engine.

Parameters:
[in] meth - the method to execute
[in] return_value - the place to store the return value of the method
[in] args - the parameters to be passed to the method

JIT_Result(* _OpenEmVm.CompileMethod)(Method_Handle method_handle)

Requests EM to start the compilation of the method.

VM or JIT method compilation stubs use the given method to ask EM to start the method compilation. EM is responsible for selecting JIT for the given method and passing the control under JIT and the specified method to VM.

Parameters:
[in] method_handle - the handle of the method to compile

void(* _OpenEmVm.RegisterCodeChunk)(Method_Handle method_handle, void *code_addr, size_t size, void *data)

Registers a code chunk in EM for later possible lookup by IP in code.

EM implements method lookup by IP. All code chunks allocated by VM as responses for JIT helper call to method_allocate_code_block helper. To register a code chunk this function is called by VM.

Parameters:
[in] method_handler - the handler of the method that occupies this code chunk.
[in] code_addr - address of the code.
[in] size - size of the code chunk in bytes.
[in] data - pointer to additional data associated with code chunk, may be NULL if VM is not interested in storing any data.

Method_Handle(* _OpenEmVm.LookupCodeChunk)(void *addr, Boolean is_ip_past, void **code_addr, size_t *size, void **data)

Lookup code chunk by IP.

Return code chunk registered by RegisterCodeChunk if addr pointer points inside of it.

Parameters:
[in] addr - IP address to use to lookup code chunk.
[in] is_ip_past - TRUE if IP points to an instruction after call, FALSE otherwise
[out] code_addr - start address of found code chunk, if NULL, argument is not filled.
[out] size - size of found code chunk in bytes, if NULL, argument is not filled.
[out] data - additional data that was specified to store with code chunk. If NULL, argument is not filled.
Returns:
the handle of the method that occupies found code chunk. NULL if no method is found.

Boolean(* _OpenEmVm.UnregisterCodeChunk)(void *addr)

Removes registered code chunk from the lookup table.

Parameters:
[in] addr - Any IP address that points to the code region of the method.
Returns:
TRUE if removal was successful, FALSE otherwise, e.g. if code chunk was not found.

void(* _OpenEmVm.ProfilerThreadTimeout)()

The method is used to callback EM from the profiler thread supported by VM on time-out.

void(* _OpenEmVm.ClassloaderUnloadingCallback)(ClassLoaderHandle class_handle)


The documentation for this struct was generated from the following file:

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

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