Move stat_startGCSync
authorBartosz Nitka <niteria@gmail.com>
Wed, 27 Jul 2016 15:25:59 +0000 (08:25 -0700)
committerBartosz Nitka <niteria@gmail.com>
Wed, 27 Jul 2016 15:26:23 +0000 (08:26 -0700)
@simonmar told me that it makes more sense this way.

Test Plan: it still builds

Reviewers: bgamari, austin, simonmar, erikd

Reviewed By: simonmar, erikd

Subscribers: thomie, simonmar

Differential Revision: https://phabricator.haskell.org/D2428

rts/Schedule.c
rts/sm/GC.c

index d9ab913..c3911af 100644 (file)
@@ -1646,6 +1646,8 @@ scheduleDoGC (Capability **pcap, Task *task USED_IF_THREADS,
         } while (was_syncing);
     }
 
+    stat_startGCSync(gc_threads[cap->no]);
+
 #ifdef DEBUG
     unsigned int old_n_capabilities = n_capabilities;
 #endif
index 7796f30..a6a1a9a 100644 (file)
@@ -1099,8 +1099,6 @@ waitForGcThreads (Capability *cap USED_IF_THREADS)
     uint32_t i, j;
     rtsBool retry = rtsTrue;
 
-    stat_startGCSync(gc_threads[cap->no]);
-
     while(retry) {
         for (i=0; i < n_threads; i++) {
             if (i == me || gc_threads[i]->idle) continue;