Permalink
Browse files

[sgen] Remove concurrent_cementing argument to sgen_add_to_global_rem…

…set().

Since it doesn't need to pass it on to sgen_cement_lookup_or_register() it's not
needed anymore.
  • Loading branch information...
1 parent 9fb356f commit 13f410f4e54f78b4f43c3ff0cb6e2f69cc353bbd @schani schani committed Jan 27, 2013
@@ -569,7 +569,7 @@ sgen_cardtable_scan_object (char *obj, mword block_obj_size, guint8 *cards, gboo
copy_func ((void**)elem, queue);
new = *(gpointer*)elem;
if (G_UNLIKELY (sgen_ptr_in_nursery (new)))
- sgen_add_to_global_remset (elem, new, mod_union);
+ sgen_add_to_global_remset (elem, new);
}
}
}
View
@@ -1115,22 +1115,19 @@ mono_gc_clear_domain (MonoDomain * domain)
* lock must be held. For serial collectors that is not necessary.
*/
void
-sgen_add_to_global_remset (gpointer ptr, gpointer obj, gboolean concurrent_cementing)
+sgen_add_to_global_remset (gpointer ptr, gpointer obj)
{
SGEN_ASSERT (5, sgen_ptr_in_nursery (obj), "Target pointer of global remset must be in the nursery");
if (!major_collector.is_concurrent) {
- SGEN_ASSERT (5, !concurrent_cementing, "Concurrent cementing must only happen with the concurrent collector");
SGEN_ASSERT (5, current_collection_generation != -1, "Global remsets can only be added during collections");
} else {
if (current_collection_generation == -1)
- SGEN_ASSERT (5, concurrent_cementing, "Global remsets outside of collection pauses can only be added by the concurrent collector");
- if (concurrent_cementing)
- SGEN_ASSERT (5, concurrent_collection_in_progress, "Concurrent collection must be in process in order to add global remsets");
+ SGEN_ASSERT (5, sgen_concurrent_collection_in_progress (), "Global remsets outside of collection pauses can only be added by the concurrent collector");
}
if (!object_is_pinned (obj))
- SGEN_ASSERT (5, concurrent_cementing || sgen_minor_collector.is_split, "Non-pinned objects can only remain in nursery if it is a split nursery");
+ SGEN_ASSERT (5, sgen_minor_collector.is_split || sgen_concurrent_collection_in_progress (), "Non-pinned objects can only remain in nursery if it is a split nursery");
else if (sgen_cement_lookup_or_register (obj))
return;
View
@@ -511,7 +511,7 @@ void sgen_pin_stats_register_global_remset (char *obj);
void sgen_pin_stats_print_class_stats (void);
void sgen_sort_addresses (void **array, int size) MONO_INTERNAL;
-void sgen_add_to_global_remset (gpointer ptr, gpointer obj, gboolean concurrent_cementing) MONO_INTERNAL;
+void sgen_add_to_global_remset (gpointer ptr, gpointer obj) MONO_INTERNAL;
int sgen_get_current_collection_generation (void) MONO_INTERNAL;
gboolean sgen_collection_is_parallel (void) MONO_INTERNAL;
@@ -30,11 +30,9 @@ extern long long stat_scan_object_called_major;
#ifdef SGEN_CONCURRENT_MARK
#define FOLLOW_OBJECT(addr) (!sgen_ptr_in_nursery ((addr)))
#define ALWAYS_ADD_TO_GLOBAL_REMSET 1
-#define CONCURRENT_CEMENTING 1
#else
#define FOLLOW_OBJECT(addr) 1
#define ALWAYS_ADD_TO_GLOBAL_REMSET 0
-#define CONCURRENT_CEMENTING 0
#endif
#undef HANDLE_PTR
@@ -47,10 +45,10 @@ extern long long stat_scan_object_called_major;
__copy = *(ptr); \
SGEN_COND_LOG (9, __old != __copy, "Overwrote field at %p with %p (was: %p)", (ptr), *(ptr), __old); \
if (G_UNLIKELY (sgen_ptr_in_nursery (__copy) && !sgen_ptr_in_nursery ((ptr)))) \
- sgen_add_to_global_remset ((ptr), __copy, CONCURRENT_CEMENTING); \
+ sgen_add_to_global_remset ((ptr), __copy); \
} else { \
if (ALWAYS_ADD_TO_GLOBAL_REMSET && G_UNLIKELY (sgen_ptr_in_nursery (__old) && !sgen_ptr_in_nursery ((ptr)))) \
- sgen_add_to_global_remset ((ptr), __old, CONCURRENT_CEMENTING); \
+ sgen_add_to_global_remset ((ptr), __old); \
} \
} while (0)
@@ -142,7 +142,7 @@ SERIAL_COPY_OBJECT_FROM_OBJ (void **obj_slot, SgenGrayQueue *queue)
*obj_slot = forwarded;
#ifndef SGEN_SIMPLE_NURSERY
if (G_UNLIKELY (sgen_ptr_in_nursery (forwarded) && !sgen_ptr_in_nursery (obj_slot)))
- sgen_add_to_global_remset (obj_slot, forwarded, FALSE);
+ sgen_add_to_global_remset (obj_slot, forwarded);
#endif
return;
}
@@ -151,7 +151,7 @@ SERIAL_COPY_OBJECT_FROM_OBJ (void **obj_slot, SgenGrayQueue *queue)
SGEN_LOG (9, " (pinned, no change)");
HEAVY_STAT (++stat_nursery_copy_object_failed_pinned);
if (!sgen_ptr_in_nursery (obj_slot))
- sgen_add_to_global_remset (obj_slot, obj, FALSE);
+ sgen_add_to_global_remset (obj_slot, obj);
return;
}
@@ -195,7 +195,7 @@ SERIAL_COPY_OBJECT_FROM_OBJ (void **obj_slot, SgenGrayQueue *queue)
* most once would be the icing on the cake.
*/
if (!sgen_ptr_in_nursery (obj_slot))
- sgen_add_to_global_remset (obj_slot, obj, FALSE);
+ sgen_add_to_global_remset (obj_slot, obj);
return;
}
@@ -207,12 +207,12 @@ SERIAL_COPY_OBJECT_FROM_OBJ (void **obj_slot, SgenGrayQueue *queue)
*obj_slot = copy;
#ifndef SGEN_SIMPLE_NURSERY
if (G_UNLIKELY (sgen_ptr_in_nursery (copy) && !sgen_ptr_in_nursery (obj_slot)))
- sgen_add_to_global_remset (obj_slot, copy, FALSE);
+ sgen_add_to_global_remset (obj_slot, copy);
#else
/* copy_object_no_checks () can return obj on OOM */
if (G_UNLIKELY (obj == copy)) {
if (G_UNLIKELY (sgen_ptr_in_nursery (copy) && !sgen_ptr_in_nursery (obj_slot)))
- sgen_add_to_global_remset (obj_slot, copy, FALSE);
+ sgen_add_to_global_remset (obj_slot, copy);
}
#endif
}
@@ -46,7 +46,7 @@ extern long long stat_scan_object_called_nursery;
__copy = *(ptr); \
SGEN_COND_LOG (9, __old != __copy, "Overwrote field at %p with %p (was: %p)", (ptr), *(ptr), __old); \
if (G_UNLIKELY (sgen_ptr_in_nursery (__copy) && !sgen_ptr_in_nursery ((ptr)))) \
- sgen_add_to_global_remset ((ptr), __copy, FALSE); \
+ sgen_add_to_global_remset ((ptr), __copy); \
} \
} while (0)
View
@@ -423,7 +423,7 @@ handle_remset (mword *p, void *start_nursery, void *end_nursery, gboolean global
* becomes part of the global remset, which can grow very large.
*/
SGEN_LOG (9, "Add to global remset because of pinning %p (%p %s)", ptr, copy, sgen_safe_name (copy));
- sgen_add_to_global_remset (ptr, copy, FALSE);
+ sgen_add_to_global_remset (ptr, copy);
}
} else {
SGEN_LOG (9, "Skipping remset at %p holding %p", ptr, *ptr);
@@ -442,7 +442,7 @@ handle_remset (mword *p, void *start_nursery, void *end_nursery, gboolean global
copy = *ptr;
SGEN_LOG (9, "Overwrote remset at %p with %p (count: %d)", ptr, copy, (int)count);
if (!global && copy >= start_nursery && copy < end_nursery)
- sgen_add_to_global_remset (ptr, copy, FALSE);
+ sgen_add_to_global_remset (ptr, copy);
++ptr;
}
return p + 2;

0 comments on commit 13f410f

Please sign in to comment.