[sgen] Fix size warnings in the descriptor code.
[mono.git] / mono / metadata / sgen-major-scan-object.h
index bc55f0888c2698471306b37cf191a26ad89adc06..a4674a2139d4c7180b260fc8b9eac8c9799cd121 100644 (file)
@@ -41,6 +41,7 @@ extern long long stat_scan_object_called_major;
 #define HANDLE_PTR(ptr,obj)    do {                                    \
                void *__old = *(ptr);                                   \
                void *__copy;                                           \
+               SGEN_OBJECT_LAYOUT_STATISTICS_MARK_BITMAP ((obj), (ptr)); \
                if (__old && FOLLOW_OBJECT (__old)) {                   \
                        PREFETCH_DYNAMIC_HEAP (__old);                  \
                        CONCURRENT_NAME (major_copy_or_mark_object) ((ptr), __old, queue); \
@@ -57,8 +58,12 @@ extern long long stat_scan_object_called_major;
 static void
 CONCURRENT_NAME (major_scan_object) (char *start, SgenGrayQueue *queue)
 {
+       SGEN_OBJECT_LAYOUT_STATISTICS_DECLARE_BITMAP;
+
+#define SCAN_OBJECT_PROTOCOL
 #include "sgen-scan-object.h"
 
+       SGEN_OBJECT_LAYOUT_STATISTICS_COMMIT_BITMAP;
        HEAVY_STAT (++stat_scan_object_called_major);
 }
 
@@ -67,13 +72,18 @@ CONCURRENT_NAME (major_scan_object) (char *start, SgenGrayQueue *queue)
 #error concurrent and parallel mark not supported yet
 #else
 static void
-CONCURRENT_NAME (major_scan_vtype) (char *start, mword desc, SgenGrayQueue *queue)
+CONCURRENT_NAME (major_scan_vtype) (char *start, mword desc, SgenGrayQueue *queue BINARY_PROTOCOL_ARG (size_t size))
 {
+       SGEN_OBJECT_LAYOUT_STATISTICS_DECLARE_BITMAP;
+
        /* The descriptors include info about the MonoObject header as well */
        start -= sizeof (MonoObject);
 
 #define SCAN_OBJECT_NOVTABLE
+#define SCAN_OBJECT_PROTOCOL
 #include "sgen-scan-object.h"
+
+       SGEN_OBJECT_LAYOUT_STATISTICS_COMMIT_BITMAP;
 }
 #endif
 #endif