[dtrace] GC heap allocation probes for SGen.
[mono.git] / mono / metadata / sgen-major-copying.c
index f97ae5fa9ca720d2700ed1f8b023a28a462a4b67..d1737a6b787b6630f0779dcdf7499eafc1463e90 100644 (file)
@@ -98,9 +98,9 @@ static void*
 major_alloc_heap (mword nursery_size, mword nursery_align, int the_nursery_bits)
 {
        if (nursery_align)
-               nursery_start = sgen_alloc_os_memory_aligned (nursery_size, nursery_align, TRUE);
+               nursery_start = sgen_alloc_os_memory_aligned (nursery_size, nursery_align, TRUE, TRUE, "nursery");
        else
-               nursery_start = sgen_alloc_os_memory (nursery_size, TRUE);
+               nursery_start = sgen_alloc_os_memory (nursery_size, TRUE, TRUE, "nursery");
 
        nursery_end = nursery_start + nursery_size;
        nursery_bits = the_nursery_bits;
@@ -129,7 +129,7 @@ alloc_major_section (void)
        GCMemSection *section;
        int scan_starts;
 
-       section = sgen_alloc_os_memory_aligned (MAJOR_SECTION_SIZE, MAJOR_SECTION_SIZE, TRUE);
+       section = sgen_alloc_os_memory_aligned (MAJOR_SECTION_SIZE, MAJOR_SECTION_SIZE, TRUE, TRUE, "major heap section");
        section->next_data = section->data = (char*)section + SGEN_SIZEOF_GC_MEM_SECTION;
        g_assert (!((mword)section->data & 7));
        section->size = MAJOR_SECTION_SIZE - SGEN_SIZEOF_GC_MEM_SECTION;
@@ -137,7 +137,7 @@ alloc_major_section (void)
        sgen_update_heap_boundaries ((mword)section->data, (mword)section->end_data);
        DEBUG (3, fprintf (gc_debug_file, "New major heap section: (%p-%p), total: %lld\n", section->data, section->end_data, (long long int)mono_gc_get_heap_size ()));
        scan_starts = (section->size + SGEN_SCAN_START_SIZE - 1) / SGEN_SCAN_START_SIZE;
-       section->scan_starts = sgen_alloc_internal_dynamic (sizeof (char*) * scan_starts, INTERNAL_MEM_SCAN_STARTS);
+       section->scan_starts = sgen_alloc_internal_dynamic (sizeof (char*) * scan_starts, INTERNAL_MEM_SCAN_STARTS, TRUE);
        section->num_scan_start = scan_starts;
        section->block.role = MEMORY_ROLE_GEN1;
        section->is_to_space = TRUE;
@@ -157,7 +157,7 @@ free_major_section (GCMemSection *section)
        DEBUG (3, fprintf (gc_debug_file, "Freed major section %p (%p-%p)\n", section, section->data, section->end_data));
        sgen_free_internal_dynamic (section->scan_starts,
                        (section->size + SGEN_SCAN_START_SIZE - 1) / SGEN_SCAN_START_SIZE * sizeof (char*), INTERNAL_MEM_SCAN_STARTS);
-       sgen_free_os_memory (section, MAJOR_SECTION_SIZE);
+       sgen_free_os_memory (section, MAJOR_SECTION_SIZE, TRUE);
 
        --num_major_sections;
 }