XXX: Unconditionally flush update remembered set during minor GC
authorBen Gamari <ben@smart-cactus.org>
Thu, 9 May 2019 01:28:35 +0000 (21:28 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 19 Jun 2019 01:44:01 +0000 (21:44 -0400)
rts/sm/GC.c

index 243de92..35d0253 100644 (file)
@@ -755,6 +755,11 @@ GarbageCollect (uint32_t collect_gen,
   // N.B. This can only happen after we've moved
   // oldest_gen->scavenged_large_objects back to oldest_gen->large_objects.
   ASSERT(oldest_gen->scavenged_large_objects == NULL);
+  if (RtsFlags.GcFlags.useNonmoving) {
+      RELEASE_SM_LOCK;
+      nonmovingAddUpdRemSetBlocks(&gct->cap->upd_rem_set.queue);
+      ACQUIRE_SM_LOCK;
+  }
   if (RtsFlags.GcFlags.useNonmoving && major_gc) {
       // All threads in non-moving heap should be found to be alive, becuase
       // threads in the non-moving generation's list should live in the