#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-machine.h>
#include <mono/utils/mono-stack-unwinding.h>
+#include <mono/utils/mono-threads.h>
#define MONO_BREAKPOINT_ARRAY_SIZE 64
MonoInst *spill_var; /* for OP_ICONV_TO_R8_RAW and OP_FCONV_TO_R8_X */
guint16 source_opcode; /*OP_XCONV_R8_TO_I4 needs to know which op was used to do proper widening*/
int pc_offset; /* OP_GC_LIVERANGE_START/END */
+ int memory_barrier_kind; /* see mono-memory-model.h for valid values */
} backend;
MonoClass *klass;
guint gen_seq_points : 1;
guint explicit_null_checks : 1;
guint compute_gc_maps : 1;
+ guint soft_breakpoints : 1;
gpointer debug_info;
guint32 lmf_offset;
guint16 *intvars;
*/
guint8 *gc_map;
guint32 gc_map_size;
+
+ /* Stats */
+ int stat_allocate_var;
+ int stat_locals_stack_size;
+ int stat_basic_blocks;
+ int stat_cil_code_size;
+ int stat_n_regvars;
+ int stat_inlineable_methods;
+ int stat_inlined_methods;
+ int stat_cas_demand_generation;
+ int stat_code_reallocs;
} MonoCompile;
typedef enum {
} MonoCompileFlags;
typedef struct {
- gulong methods_compiled;
- gulong methods_aot;
- gulong methods_lookups;
- gulong allocate_var;
- gulong cil_code_size;
- gulong native_code_size;
- gulong code_reallocs;
- gulong max_code_size_ratio;
- gulong biggest_method_size;
- gulong allocated_code_size;
- gulong inlineable_methods;
- gulong inlined_methods;
- gulong basic_blocks;
- gulong max_basic_blocks;
- gulong locals_stack_size;
- gulong regvars;
- gulong cas_declsec_check;
- gulong cas_linkdemand_icall;
- gulong cas_linkdemand_pinvoke;
- gulong cas_linkdemand_aptc;
- gulong cas_linkdemand;
- gulong cas_demand_generation;
- gulong generic_virtual_invocations;
- int methods_with_llvm;
+ gint32 methods_compiled;
+ gint32 methods_aot;
+ gint32 methods_lookups;
+ gint32 allocate_var;
+ gint32 cil_code_size;
+ gint32 native_code_size;
+ gint32 code_reallocs;
+ gint32 max_code_size_ratio;
+ gint32 biggest_method_size;
+ gint32 allocated_code_size;
+ gint32 inlineable_methods;
+ gint32 inlined_methods;
+ gint32 basic_blocks;
+ gint32 max_basic_blocks;
+ gint32 locals_stack_size;
+ gint32 regvars;
+ gint32 cas_declsec_check;
+ gint32 cas_linkdemand_icall;
+ gint32 cas_linkdemand_pinvoke;
+ gint32 cas_linkdemand_aptc;
+ gint32 cas_linkdemand;
+ gint32 cas_demand_generation;
+ gint32 generic_virtual_invocations;
+ int methods_with_llvm;
int methods_without_llvm;
char *max_ratio_method;
char *biggest_method;
* debugging of the stack marking code in the GC.
*/
gboolean init_stacks;
+
+ /*
+ * Whenever to implement single stepping and breakpoints without signals in the
+ * soft debugger. This is useful on platforms without signals, like the ps3, or during
+ * runtime debugging, since it avoids SIGSEGVs when a single step location or breakpoint
+ * is hit.
+ */
+ gboolean soft_breakpoints;
} MonoDebugOptions;
enum {
gpointer mono_arch_ip_from_context (void *sigctx) MONO_INTERNAL;
void mono_arch_sigctx_to_monoctx (void *sigctx, MonoContext *ctx) MONO_INTERNAL;
void mono_arch_monoctx_to_sigctx (MonoContext *mctx, void *ctx) MONO_INTERNAL;
-gpointer mono_arch_context_get_int_reg (MonoContext *ctx, int reg) MONO_INTERNAL;
+mgreg_t mono_arch_context_get_int_reg (MonoContext *ctx, int reg) MONO_INTERNAL;
+void mono_arch_context_set_int_reg (MonoContext *ctx, int reg, mgreg_t val) MONO_INTERNAL;
void mono_arch_flush_register_windows (void) MONO_INTERNAL;
gboolean mono_arch_is_inst_imm (gint64 imm) MONO_INTERNAL;
MonoInst* mono_arch_get_domain_intrinsic (MonoCompile* cfg) MONO_INTERNAL;
gpointer mono_arch_install_handler_block_guard (MonoJitInfo *ji, MonoJitExceptionInfo *clause, MonoContext *ctx, gpointer new_value) MONO_INTERNAL;
gpointer mono_arch_create_handler_block_trampoline (void) MONO_INTERNAL;
gpointer mono_create_handler_block_trampoline (void) MONO_INTERNAL;
-gboolean mono_install_handler_block_guard (MonoInternalThread *thread, MonoContext *ctx) MONO_INTERNAL;
+gboolean mono_install_handler_block_guard (MonoThreadUnwindState *ctx) MONO_INTERNAL;
+
+/*New interruption machinery */
+void
+mono_setup_async_callback (MonoContext *ctx, void (*async_cb)(void *fun), gpointer user_data) MONO_INTERNAL;
+
+void
+mono_arch_setup_async_callback (MonoContext *ctx, void (*async_cb)(void *fun), gpointer user_data) MONO_INTERNAL;
+
+gboolean
+mono_thread_state_init_from_handle (MonoThreadUnwindState *tctx, MonoNativeThreadId thread_id, MonoNativeThreadHandle thread_handle) MONO_INTERNAL;
+
/* Exception handling */
typedef gboolean (*MonoJitStackWalk) (StackFrameInfo *frame, MonoContext *ctx, gpointer data);
/* for MONO_WRAPPER_UNKNOWN/MANAGED_TO_MANAGED subtypes */
enum {
- MONO_AOT_WRAPPER_MONO_ENTER,
- MONO_AOT_WRAPPER_MONO_EXIT,
+ MONO_AOT_WRAPPER_MONITOR_ENTER,
+ MONO_AOT_WRAPPER_MONITOR_EXIT,
MONO_AOT_WRAPPER_ELEMENT_ADDR,
MONO_AOT_WRAPPER_PTR_TO_STRUCTURE,
MONO_AOT_WRAPPER_STRUCTURE_TO_PTR,
MONO_AOT_WRAPPER_CASTCLASS_WITH_CACHE,
+ MONO_AOT_WRAPPER_ISINST_WITH_CACHE,
+ MONO_AOT_WRAPPER_MONITOR_ENTER_V4,
MONO_AOT_WRAPPER_LAST
};