[commit: ghc] master: Move printMutableList to Printer.c next to other printers (857005a)
git at git.haskell.org
git at git.haskell.org
Wed May 30 10:10:59 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/857005a762a12e021c3cc65b729bd6263b7145fb/ghc
>---------------------------------------------------------------
commit 857005a762a12e021c3cc65b729bd6263b7145fb
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date: Wed May 30 13:02:53 2018 +0300
Move printMutableList to Printer.c next to other printers
>---------------------------------------------------------------
857005a762a12e021c3cc65b729bd6263b7145fb
rts/Printer.c | 22 +++++++++++++++-------
rts/Printer.h | 1 +
rts/sm/GCUtils.c | 21 ---------------------
rts/sm/GCUtils.h | 5 -----
4 files changed, 16 insertions(+), 33 deletions(-)
diff --git a/rts/Printer.c b/rts/Printer.c
index ae76a41..01f1692 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -425,6 +425,21 @@ printClosure( const StgClosure *obj )
}
}
+void
+printMutableList(bdescr *bd)
+{
+ StgPtr p;
+
+ debugBelch("mutable list %p: ", bd);
+
+ for (; bd != NULL; bd = bd->link) {
+ for (p = bd->start; p < bd->free; p++) {
+ debugBelch("%p (%s), ", (void *)*p, info_type((StgClosure *)*p));
+ }
+ }
+ debugBelch("\n");
+}
+
// If you know you have an UPDATE_FRAME, but want to know exactly which.
const char *info_update_frame(const StgClosure *closure)
{
@@ -444,13 +459,6 @@ const char *info_update_frame(const StgClosure *closure)
}
}
-/*
-void printGraph( StgClosure *obj )
-{
- printClosure(obj);
-}
-*/
-
static void
printSmallBitmap( StgPtr spBottom, StgPtr payload, StgWord bitmap,
uint32_t size )
diff --git a/rts/Printer.h b/rts/Printer.h
index dd268be..d2eaf01 100644
--- a/rts/Printer.h
+++ b/rts/Printer.h
@@ -24,6 +24,7 @@ const char * info_update_frame ( const StgClosure *closure );
extern void printClosure ( const StgClosure *obj );
extern void printStackChunk ( StgPtr sp, StgPtr spLim );
extern void printTSO ( StgTSO *tso );
+extern void printMutableList( bdescr *bd );
extern void DEBUG_LoadSymbols( const char *name );
diff --git a/rts/sm/GCUtils.c b/rts/sm/GCUtils.c
index 0373c2b..24f7b5e 100644
--- a/rts/sm/GCUtils.c
+++ b/rts/sm/GCUtils.c
@@ -341,24 +341,3 @@ alloc_todo_block (gen_workspace *ws, uint32_t size)
return ws->todo_free;
}
-
-/* -----------------------------------------------------------------------------
- * Debugging
- * -------------------------------------------------------------------------- */
-
-#if defined(DEBUG)
-void
-printMutableList(bdescr *bd)
-{
- StgPtr p;
-
- debugBelch("mutable list %p: ", bd);
-
- for (; bd != NULL; bd = bd->link) {
- for (p = bd->start; p < bd->free; p++) {
- debugBelch("%p (%s), ", (void *)*p, info_type((StgClosure *)*p));
- }
- }
- debugBelch("\n");
-}
-#endif /* DEBUG */
diff --git a/rts/sm/GCUtils.h b/rts/sm/GCUtils.h
index 2e2d4b1..3c17449 100644
--- a/rts/sm/GCUtils.h
+++ b/rts/sm/GCUtils.h
@@ -50,11 +50,6 @@ isPartiallyFull(bdescr *bd)
return (bd->free + WORK_UNIT_WORDS < bd->start + BLOCK_SIZE_W);
}
-
-#if defined(DEBUG)
-void printMutableList (bdescr *bd);
-#endif
-
// Version of recordMutableGen for use during GC. This uses the
// mutable lists attached to the current gc_thread structure, which
// are the same as the mutable lists on the Capability.
More information about the ghc-commits
mailing list