Commit 857005a7 authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan

Move printMutableList to Printer.c next to other printers

parent 929bbe4f
......@@ -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 )
......
......@@ -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 );
......
......@@ -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 */
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment