X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FGC.c;h=09e2b2c2f87ae51d358eeb108b2cdacceaafb413;hb=ea661992b7397eddee145b80a449c40ab565fd12;hp=fe26cf9e531849f0acf54d9dbd46f7dd8429a0a7;hpb=15b6daa6d8e35e34ad077049c1f76d9f5966be9a;p=ghc-hetmet.git diff --git a/rts/sm/GC.c b/rts/sm/GC.c index fe26cf9..09e2b2c 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -214,11 +214,6 @@ GarbageCollect ( rtsBool force_major_gc ) stmPreGCHook(); #ifdef DEBUG - // check for memory leaks if DEBUG is on - memInventory(); -#endif - -#ifdef DEBUG mutlist_MUTVARS = 0; mutlist_MUTARRS = 0; mutlist_OTHERS = 0; @@ -266,6 +261,11 @@ GarbageCollect ( rtsBool force_major_gc ) } #endif +#ifdef DEBUG + // check for memory leaks if DEBUG is on + memInventory(traceClass(DEBUG_gc)); +#endif + // check stack sanity *before* GC (ToDo: check all threads) IF_DEBUG(sanity, checkFreeListSanity()); @@ -274,12 +274,6 @@ GarbageCollect ( rtsBool force_major_gc ) static_objects = END_OF_STATIC_LIST; scavenged_static_objects = END_OF_STATIC_LIST; -#ifdef THREADED_RTS - initSpinLock(&static_objects_sync); - initSpinLock(&recordMutableGen_sync); - initSpinLock(&gc_alloc_block_sync); -#endif - // Initialise all the generations/steps that we're collecting. for (g = 0; g <= N; g++) { init_collected_gen(g,n_gc_threads); @@ -667,7 +661,7 @@ GarbageCollect ( rtsBool force_major_gc ) #ifdef DEBUG // check for memory leaks if DEBUG is on - memInventory(); + memInventory(traceClass(DEBUG_gc)); #endif #ifdef RTS_GTK_FRONTPANEL