Avoid computing GC maps if precise stack marking is disabled.
authorZoltan Varga <vargaz@gmail.com>
Mon, 3 Jan 2011 14:52:11 +0000 (15:52 +0100)
committerZoltan Varga <vargaz@gmail.com>
Mon, 3 Jan 2011 14:52:11 +0000 (15:52 +0100)
mono/metadata/sgen-gc.c
mono/metadata/sgen-gc.h
mono/mini/mini-gc.c

index da1ef33bf1c5167bb3b67b8a08cb205c328be749..49c96171468ac1221980e14bef3c755d25753974 100644 (file)
@@ -251,7 +251,7 @@ static gboolean xdomain_checks = FALSE;
 /* If not null, dump the heap after each collection into this file */
 static FILE *heap_dump_file = NULL;
 /* If set, mark stacks conservatively, even if precise marking is possible */
-static gboolean conservative_stack_mark = FALSE;
+gboolean conservative_stack_mark = FALSE;
 /* If set, do a plausibility check on the scan_starts before and after
    each collection */
 static gboolean do_scan_starts_check = FALSE;
index 10eb26639e30d113cdd1d16601965df26b6e928a..1bd860232f611669868e29d5ca4ef98c765dbcfe 100644 (file)
@@ -229,6 +229,8 @@ extern FILE* gc_debug_file;
 
 extern int current_collection_generation;
 
+extern gboolean conservative_stack_mark;
+
 #define SGEN_ALLOC_ALIGN               8
 #define SGEN_ALLOC_ALIGN_BITS  3
 
index b1aff81cc303d58869f69b7545b54a7d8030af70..ced5aefdc1f1da2de248dfe321905cb5639af52a 100644 (file)
@@ -1117,6 +1117,9 @@ mini_gc_init_gc_map (MonoCompile *cfg)
        if (COMPILE_LLVM (cfg))
                return;
 
+       if (!cfg->compile_aot && conservative_stack_mark)
+               return;
+
 #if 1
        /* Debugging support */
        {