summaryrefslogtreecommitdiff
path: root/rts/sm/GC.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/sm/GC.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/sm/GC.c')
-rw-r--r--rts/sm/GC.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 4dbc5e0aa6..c5ab7a8161 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -133,6 +133,10 @@ uint32_t n_gc_threads;
// For stats:
static long copied; // *words* copied & scavenged during this GC
+#if defined(PROF_SPIN) && defined(THREADED_RTS)
+volatile StgWord64 whitehole_gc_spin = 0;
+#endif
+
bool work_stealing;
uint32_t static_flag = STATIC_FLAG_B;