These functions are used to get some runtime information from the Just in Time compiler and also to control some aspects of the initialization and shutdown of the runtime.
Use the `MonoJitInfo` API to get data about a JITed method. These APIs are typically used by profiler modules added to Mono.
mono_jit_info_table_find
domain | Domain that you want to look up |
addr | Points to an address with JITed code. |
NULL
if the address does not belong to JITed code (it might be native
code or a trampoline) or a valid pointer to a MonoJitInfo*
.
Use this function to obtain a MonoJitInfo*
object that can be used to get
some statistics. You should provide both the domain on which you will be
performing the probe, and an address. Since application domains can share code
the same address can be in use by multiple domains at once.
This does not return any results for trampolines.
mono_jit_info_get_code_size
ji | the JIT information handle |
Use this function to get the code size for the method described by
the ji object. You can use this plus the mono_jit_info_get_code_start
to determine the start and end of the native code.
mono_jit_info_get_code_start
ji | the JIT information handle |
Use this function to get the starting address for the method described by
the ji object. You can use this plus the mono_jit_info_get_code_size
to determine the start and end of the native code.
mono_jit_info_get_method
ji | the JIT information handle |
MonoMethod
that represents the code tracked
by ji.
Use this function to get the MonoMethod*
that backs
the ji object.
These functions are useful when running the Mono VM inside a debugger.
mono_pmip
ip | an instruction pointer address |
This method is used from a debugger to get the name of the method at address ip. This routine is typically invoked from a debugger like this:
(gdb) print mono_pmip ($pc)
mono_print_method_from_ip
ip | an instruction pointer address |
This method is used from a debugger to get the name of the method at address ip.
This prints the name of the method at address ip in the standard
output. Unlike mono_pmip
which returns a string, this routine
prints the value on the standard output.
mono_print_thread_dump
Print information about the current thread to stdout.
sigctx can be NULL
, allowing this to be called from gdb.
mono_threads_request_thread_dump
Ask all threads except the current to print their stacktrace to stdout.
mono_assemblies_init
Initialize global variables used by this module.
mono_assemblies_cleanup
Free all resources used by this module.
mono_environment_exitcode_get
mono_environment_exitcode_set
mono_install_runtime_cleanup
mono_runtime_set_shutting_down
Invoked by System.Environment.Exit
to flag that the runtime
is shutting down.