summaryrefslogtreecommitdiff
path: root/rts/Stats.c
diff options
context:
space:
mode:
authorDouglas Wilson <douglas.wilson@gmail.com>2018-01-21 12:08:19 -0500
committerBen Gamari <ben@smart-cactus.org>2018-01-21 12:08:20 -0500
commit180ca65ff6d1b4f3f4cdadc569fd4de107be14db (patch)
tree4bb39d6e1123897d0988674a25788c8d3bcab691 /rts/Stats.c
parent5edb18a962cbfee0ff869b1a77ebf2cd79dd8ef5 (diff)
downloadhaskell-180ca65ff6d1b4f3f4cdadc569fd4de107be14db.tar.gz
[rts] Adjust whitehole_spin
Rename to whitehole_gc_spin, in preparation for adding stats for the whitehole busy-loop in SMPClosureOps. Make whitehole_gc_spin volatile, and move it to be defined and statically initialised in GC.c. This saves some #ifs, and I'm pretty sure it should be volatile. Test Plan: ./validate Reviewers: bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4300
Diffstat (limited to 'rts/Stats.c')
-rw-r--r--rts/Stats.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rts/Stats.c b/rts/Stats.c
index fa85878621..26bdac0ea5 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -16,7 +16,7 @@
#include "Profiling.h"
#include "GetTime.h"
#include "sm/Storage.h"
-#include "sm/GC.h" // gc_alloc_block_sync, whitehole_spin
+#include "sm/GC.h" // gc_alloc_block_sync, whitehole_gc_spin
#include "sm/GCThread.h"
#include "sm/BlockAlloc.h"
@@ -769,7 +769,8 @@ stat_exit (void)
uint32_t g;
statsPrintf("gc_alloc_block_sync: %"FMT_Word64"\n", gc_alloc_block_sync.spin);
- statsPrintf("whitehole_spin: %"FMT_Word64"\n", whitehole_spin);
+ statsPrintf("whitehole_gc_spin: %"FMT_Word64"\n"
+ , whitehole_gc_spin);
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
statsPrintf("gen[%d].sync: %"FMT_Word64"\n", g, generations[g].sync.spin);
}