diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-05-30 13:02:53 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-05-30 13:09:59 +0300 |
commit | 857005a762a12e021c3cc65b729bd6263b7145fb (patch) | |
tree | beb87bb7f5dc352d595264af44e8fa3bd7301d7d | |
parent | 929bbe4fb2bc701d4820bcf7a1b1ff074f8d6226 (diff) | |
download | haskell-857005a762a12e021c3cc65b729bd6263b7145fb.tar.gz |
Move printMutableList to Printer.c next to other printers
-rw-r--r-- | rts/Printer.c | 22 | ||||
-rw-r--r-- | rts/Printer.h | 1 | ||||
-rw-r--r-- | rts/sm/GCUtils.c | 21 | ||||
-rw-r--r-- | rts/sm/GCUtils.h | 5 |
4 files changed, 16 insertions, 33 deletions
diff --git a/rts/Printer.c b/rts/Printer.c index ae76a4143e..01f16921cf 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 dd268bef42..d2eaf010c6 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 0373c2b925..24f7b5e61e 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 2e2d4b199d..3c174491ce 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. |