[sgen] Implement get_and_reset_num_major_objects_marked() for non-conc, too.
authorMark Probst <mark.probst@gmail.com>
Wed, 20 Aug 2014 20:45:50 +0000 (13:45 -0700)
committerMark Probst <mark.probst@gmail.com>
Mon, 29 Sep 2014 18:03:58 +0000 (11:03 -0700)
This is used for profiling and debugging.  There's no reason to only
have it for concurrent.

mono/metadata/sgen-marksweep.c

index 740cfab973f7fdfd3c49fb76a1ff80a81ef80f9e..04b99ac11a1efd9032af90a820abc44e38144208 100644 (file)
@@ -1044,6 +1044,7 @@ major_copy_or_mark_object_concurrent_canonical (void **ptr, SgenGrayQueue *queue
 {
        major_copy_or_mark_object_concurrent (ptr, *ptr, queue);
 }
+#endif
 
 static long long
 major_get_and_reset_num_major_objects_marked (void)
@@ -1056,7 +1057,6 @@ major_get_and_reset_num_major_objects_marked (void)
        return 0;
 #endif
 }
-#endif
 
 #include "sgen-major-scan-object.h"
 
@@ -2054,13 +2054,13 @@ sgen_marksweep_init_internal (SgenMajorCollector *collector, gboolean is_concurr
        if (is_concurrent) {
                collector->is_concurrent = TRUE;
                collector->want_synchronous_collection = &want_evacuation;
-               collector->get_and_reset_num_major_objects_marked = major_get_and_reset_num_major_objects_marked;
        } else
 #endif
        {
                collector->is_concurrent = FALSE;
                collector->want_synchronous_collection = NULL;
        }
+       collector->get_and_reset_num_major_objects_marked = major_get_and_reset_num_major_objects_marked;
        collector->supports_cardtable = TRUE;
 
        collector->have_swept = &have_swept;