Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / sgen / sgen-debug.c
index b519a1ec58eb17750a9407ea4269317c22f57e95..904460bdfdd94e80a2e74651bdef627e484f20d7 100644 (file)
@@ -325,7 +325,7 @@ static void
 setup_valid_nursery_objects (void)
 {
        if (!valid_nursery_objects)
-               valid_nursery_objects = (GCObject **)sgen_alloc_os_memory (DEFAULT_NURSERY_SIZE, (SgenAllocFlags)(SGEN_ALLOC_INTERNAL | SGEN_ALLOC_ACTIVATE), "debugging data", MONO_MEM_ACCOUNT_SGEN_DEBUGGING);
+               valid_nursery_objects = (GCObject **)sgen_alloc_os_memory (sgen_nursery_max_size, (SgenAllocFlags)(SGEN_ALLOC_INTERNAL | SGEN_ALLOC_ACTIVATE), "debugging data", MONO_MEM_ACCOUNT_SGEN_DEBUGGING);
        valid_nursery_object_count = 0;
        sgen_scan_area_with_callback (nursery_section->data, nursery_section->end_data, setup_mono_sgen_scan_area_with_callback, NULL, FALSE, FALSE);
 }
@@ -502,9 +502,9 @@ find_pinning_ref_from_thread (char *obj, size_t size)
                char **start = (char**)info->client_info.stack_start;
                if (info->client_info.skip || info->client_info.gc_disabled)
                        continue;
-               while (start < (char**)info->client_info.stack_end) {
+               while (start < (char**)info->client_info.info.stack_end) {
                        if (*start >= obj && *start < endobj)
-                               SGEN_LOG (0, "Object %p referenced in thread %p (id %p) at %p, stack: %p-%p", obj, info, (gpointer)mono_thread_info_get_tid (info), start, info->client_info.stack_start, info->client_info.stack_end);
+                               SGEN_LOG (0, "Object %p referenced in thread %p (id %p) at %p, stack: %p-%p", obj, info, (gpointer)mono_thread_info_get_tid (info), start, info->client_info.stack_start, info->client_info.info.stack_end);
                        start++;
                }
 
@@ -1065,10 +1065,10 @@ void
 sgen_dump_section (GCMemSection *section, const char *type)
 {
        char *start = section->data;
-       char *end = section->data + section->size;
+       char *end = section->end_data;
        char *occ_start = NULL;
 
-       fprintf (heap_dump_file, "<section type=\"%s\" size=\"%lu\">\n", type, (unsigned long)section->size);
+       fprintf (heap_dump_file, "<section type=\"%s\" size=\"%lu\">\n", type, (unsigned long)(section->end_data - section->data));
 
        while (start < end) {
                guint size;
@@ -1083,7 +1083,6 @@ sgen_dump_section (GCMemSection *section, const char *type)
                        start += sizeof (void*); /* should be ALLOC_ALIGN, really */
                        continue;
                }
-               g_assert (start < section->next_data);
 
                if (!occ_start)
                        occ_start = start;