Permalink
Browse files

[sgen] Remove redundant argument to sgen_cement_lookup_or_register().

It can figure out whether a concurrent collection is running on its own.
  • Loading branch information...
1 parent 4c512cb commit 9fb356fd6ac3f36eed4ab38707a51ad80d299ef9 @schani schani committed Jan 27, 2013
Showing with 4 additions and 3 deletions.
  1. +1 −1 mono/metadata/sgen-gc.c
  2. +2 −1 mono/metadata/sgen-pinning.c
  3. +1 −1 mono/metadata/sgen-pinning.h
View
@@ -1131,7 +1131,7 @@ sgen_add_to_global_remset (gpointer ptr, gpointer obj, gboolean concurrent_cemen
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");
- else if (sgen_cement_lookup_or_register (obj, concurrent_cementing))
+ else if (sgen_cement_lookup_or_register (obj))
return;
remset.record_pointer (ptr);
@@ -262,10 +262,11 @@ sgen_cement_lookup (char *obj)
}
gboolean
-sgen_cement_lookup_or_register (char *obj, gboolean concurrent_cementing)
+sgen_cement_lookup_or_register (char *obj)
{
int i;
CementHashEntry *hash;
+ gboolean concurrent_cementing = sgen_concurrent_collection_in_progress ();
if (!cement_enabled)
return FALSE;
@@ -52,7 +52,7 @@ void sgen_cement_reset (void) MONO_INTERNAL;
void sgen_cement_concurrent_start (void) MONO_INTERNAL;
void sgen_cement_concurrent_finish (void) MONO_INTERNAL;
gboolean sgen_cement_lookup (char *obj) MONO_INTERNAL;
-gboolean sgen_cement_lookup_or_register (char *obj, gboolean concurrent_cementing) MONO_INTERNAL;
+gboolean sgen_cement_lookup_or_register (char *obj) MONO_INTERNAL;
void sgen_cement_iterate (IterateObjectCallbackFunc callback, void *callback_data) MONO_INTERNAL;
void sgen_cement_clear_below_threshold (void) MONO_INTERNAL;

0 comments on commit 9fb356f

Please sign in to comment.