Commit 87750c88 authored by Ben Gamari's avatar Ben Gamari 🐢

Introduce MUTLIST_DEBUG

parent de45acb0
......@@ -112,7 +112,7 @@ bool deadlock_detect_gc;
static W_ g0_pcnt_kept = 30; // percentage of g0 live at last minor GC
/* Mut-list stats */
#if defined(DEBUG)
#if defined(MUTLIST_DEBUG)
uint32_t mutlist_MUTVARS,
mutlist_MUTARRS,
mutlist_MVARS,
......@@ -250,7 +250,7 @@ GarbageCollect (uint32_t collect_gen,
// the table from occurring during GC.
stablePtrLock();
#if defined(DEBUG)
#if defined(MUTLIST_DEBUG)
mutlist_MUTVARS = 0;
mutlist_MUTARRS = 0;
mutlist_MVARS = 0;
......@@ -602,13 +602,15 @@ GarbageCollect (uint32_t collect_gen,
}
copied += mut_list_size;
debugTrace(DEBUG_gc,
"mut_list_size: %lu (%d vars, %d arrays, %d MVARs, %d TVARs, %d TVAR_WATCH_QUEUEs, %d TREC_CHUNKs, %d TREC_HEADERs, %d others)",
(unsigned long)(mut_list_size * sizeof(W_)),
mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS,
mutlist_TVAR, mutlist_TVAR_WATCH_QUEUE,
mutlist_TREC_CHUNK, mutlist_TREC_HEADER,
mutlist_OTHERS);
#if defined(MUTLIST_DEBUG)
trace(TRACE_gc,
"mut_list_size: %lu (%d vars, %d arrays, %d MVARs, %d TVARs, %d TVAR_WATCH_QUEUEs, %d TREC_CHUNKs, %d TREC_HEADERs, %d others)",
(unsigned long)(mut_list_size * sizeof(W_)),
mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS,
mutlist_TVAR, mutlist_TVAR_WATCH_QUEUE,
mutlist_TREC_CHUNK, mutlist_TREC_HEADER,
mutlist_OTHERS);
#endif
}
bdescr *next, *prev;
......
......@@ -42,7 +42,8 @@ extern StgPtr mark_sp;
extern bool work_stealing;
#if defined(DEBUG)
#define MUTLIST_DEBUG
#if defined(MUTLIST_DEBUG)
extern uint32_t mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS, mutlist_OTHERS,
mutlist_TVAR,
mutlist_TVAR_WATCH_QUEUE,
......
......@@ -1591,7 +1591,7 @@ scavenge_mutable_list(bdescr *bd, generation *gen)
p = (StgPtr)*q;
ASSERT(LOOKS_LIKE_CLOSURE_PTR(p));
#if defined(DEBUG)
#if defined(MUTLIST_DEBUG)
const StgInfoTable *pinfo;
switch (get_itbl((StgClosure *)p)->type) {
case MUT_VAR_CLEAN:
......
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