XXX: Various tracing
authorBen Gamari <ben@smart-cactus.org>
Sun, 14 Apr 2019 16:36:59 +0000 (12:36 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 19 Jun 2019 01:44:00 +0000 (21:44 -0400)
rts/sm/GC.c
rts/sm/NonMovingMark.c
rts/sm/NonMovingSweep.c
rts/sm/Storage.c

index bf32be2..243de92 100644 (file)
@@ -1823,6 +1823,7 @@ resizeGenerations (void)
     }
 
 #if 0
+    debugBelch("n_words: %lu, live_estimate=%lu\n", oldest_gen->n_words, oldest_gen->live_estimate);
     debugBelch("live: %d, min_alloc: %d, size : %d, max = %d\n", live,
                min_alloc, size, max);
     debugBelch("resize_gen: n_blocks: %lu, n_large_block: %lu, n_compact_blocks: %lu\n",
index aca3429..16b9e2d 100644 (file)
@@ -1644,6 +1644,7 @@ nonmovingMark (MarkQueue *queue)
         case NULL_ENTRY:
             // Perhaps the update remembered set has more to mark...
             if (upd_rem_set_block_list) {
+                trace(1, "Starting taking updremset");
                 ACQUIRE_LOCK(&upd_rem_set_lock);
                 bdescr *old = queue->blocks;
                 queue->blocks = upd_rem_set_block_list;
@@ -1651,12 +1652,15 @@ nonmovingMark (MarkQueue *queue)
                 upd_rem_set_block_list = NULL;
                 RELEASE_LOCK(&upd_rem_set_lock);
 
+                trace(1, "Currently taking updremset");
                 ACQUIRE_SM_LOCK;
                 freeGroup(old);
                 RELEASE_SM_LOCK;
+                trace(1, "Finished taking updremset");
             } else {
                 // Nothing more to do
                 debugTrace(DEBUG_nonmoving_gc, "Finished mark pass: %d", count);
+                trace(1, "Finished mark pass");
                 traceConcMarkEnd(count);
                 return;
             }
index 9571fbd..449c3f4 100644 (file)
@@ -240,6 +240,7 @@ void nonmovingSweepStableNameTable()
     // a stable name can die during moving heap collection and we can't use
     // nonmovingIsAlive on those objects. Inefficient.
 
+    trace(1, "StartNonmovingSweepStableNameTable")
     stableNameLock();
     FOR_EACH_STABLE_NAME(
         p, {
@@ -255,4 +256,5 @@ void nonmovingSweepStableNameTable()
             }
         });
     stableNameUnlock();
+    trace(1, "EndNonmovingSweepStableNameTable")
 }
index e651e99..9990231 100644 (file)
@@ -1463,6 +1463,9 @@ calcNeeded (bool force_major, memcount *blocks_needed)
         blocks += gen->n_large_blocks
                 + gen->n_compact_blocks;
 
+//        debugBelch("calcNeeded(%d): blocks: %lu, n_blocks: %lu, max_blocks: %lu\n",
+//                   g, blocks, gen->n_blocks, gen->max_blocks);
+
         // we need at least this much space
         needed += blocks;