From b39bc2adbb8ab0505fbf28fa2c0422717405a872 Mon Sep 17 00:00:00 2001 From: Vlad Brezae Date: Tue, 13 Sep 2016 22:59:41 +0300 Subject: [PATCH] [sgen] Increase counter when actually allocating gray sections --- mono/sgen/sgen-gray.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mono/sgen/sgen-gray.c b/mono/sgen/sgen-gray.c index 9b5f92a1954..f8f04c14580 100644 --- a/mono/sgen/sgen-gray.c +++ b/mono/sgen/sgen-gray.c @@ -49,8 +49,6 @@ sgen_gray_object_alloc_queue_section (SgenGrayQueue *queue) { GrayQueueSection *section; - HEAVY_STAT (stat_gray_queue_section_alloc ++); - if (queue->alloc_prepare_func) queue->alloc_prepare_func (queue); @@ -60,6 +58,8 @@ sgen_gray_object_alloc_queue_section (SgenGrayQueue *queue) queue->free_list = section->next; STATE_TRANSITION (section, GRAY_QUEUE_SECTION_STATE_FREE_LIST, GRAY_QUEUE_SECTION_STATE_FLOATING); } else { + HEAVY_STAT (stat_gray_queue_section_alloc ++); + /* Allocate a new section */ section = (GrayQueueSection *)sgen_alloc_internal (INTERNAL_MEM_GRAY_QUEUE); STATE_SET (section, GRAY_QUEUE_SECTION_STATE_FLOATING); -- 2.25.1