[commit: ghc] wip/nonmoving-gc: rts/GC: Expose and clean up gcCAFs (dd02baa)
git at git.haskell.org
git at git.haskell.org
Wed Feb 6 14:09:52 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nonmoving-gc
Link : http://ghc.haskell.org/trac/ghc/changeset/dd02baa09b4a24927d68cc4f4ad986e2c3d417df/ghc
>---------------------------------------------------------------
commit dd02baa09b4a24927d68cc4f4ad986e2c3d417df
Author: Ben Gamari <ben at well-typed.com>
Date: Tue Feb 5 21:17:36 2019 -0500
rts/GC: Expose and clean up gcCAFs
>---------------------------------------------------------------
dd02baa09b4a24927d68cc4f4ad986e2c3d417df
rts/sm/GC.c | 25 ++++++++-----------------
rts/sm/GC.h | 2 ++
2 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 70d6d8e..d74c387 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -175,10 +175,6 @@ static void collect_gct_blocks (void);
static void collect_pinned_object_blocks (void);
static void heapOverflow (void);
-#if defined(DEBUG)
-static void gcCAFs (void);
-#endif
-
/* -----------------------------------------------------------------------------
The mark stack.
-------------------------------------------------------------------------- */
@@ -1836,21 +1832,16 @@ resize_nursery (void)
#if defined(DEBUG)
-static void gcCAFs(void)
+void gcCAFs(void)
{
- StgIndStatic *p, *prev;
-
- const StgInfoTable *info;
- uint32_t i;
-
- i = 0;
- p = debug_caf_list;
- prev = NULL;
+ uint32_t i = 0;
+ StgIndStatic *prev = NULL;
- for (p = debug_caf_list; p != (StgIndStatic*)END_OF_CAF_LIST;
- p = (StgIndStatic*)p->saved_info) {
-
- info = get_itbl((StgClosure*)p);
+ for (StgIndStatic *p = debug_caf_list;
+ p != (StgIndStatic*) END_OF_CAF_LIST;
+ p = (StgIndStatic*) p->saved_info)
+ {
+ const StgInfoTable *info = get_itbl((StgClosure*)p);
ASSERT(info->type == IND_STATIC);
// See Note [STATIC_LINK fields] in Storage.h
diff --git a/rts/sm/GC.h b/rts/sm/GC.h
index 437a25f..db1ca76 100644
--- a/rts/sm/GC.h
+++ b/rts/sm/GC.h
@@ -49,6 +49,8 @@ extern uint32_t mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS, mutlist_OTHERS,
extern volatile StgWord64 whitehole_gc_spin;
extern volatile StgWord64 waitForGcThreads_spin;
extern volatile StgWord64 waitForGcThreads_yield;
+
+void gcCAFs(void);
#endif
void gcWorkerThread (Capability *cap);
More information about the ghc-commits
mailing list