From: Simon Marlow Date: Wed, 19 Aug 2009 14:15:18 +0000 (+0000) Subject: rename whitehole_spin to evac_collision, and update it properly X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e9655493989157820d8a0a7b0f7c311c159ef956;p=ghc-hetmet.git rename whitehole_spin to evac_collision, and update it properly --- diff --git a/rts/Stats.c b/rts/Stats.c index 6029745..4acddda 100644 --- a/rts/Stats.c +++ b/rts/Stats.c @@ -15,7 +15,7 @@ #include "Profiling.h" #include "GetTime.h" #include "sm/Storage.h" -#include "sm/GC.h" // gc_alloc_block_sync, whitehole_spin +#include "sm/GC.h" // gc_alloc_block_sync, evac_collision #if USE_PAPI #include "Papi.h" @@ -704,7 +704,7 @@ stat_exit(int alloc) nat g, s; statsPrintf("gc_alloc_block_sync: %"FMT_Word64"\n", gc_alloc_block_sync.spin); - statsPrintf("whitehole_spin: %"FMT_Word64"\n", whitehole_spin); + statsPrintf("evac_collision: %"FMT_Word64"\n", evac_collision); for (g = 0; g < RtsFlags.GcFlags.generations; g++) { for (s = 0; s < generations[g].n_steps; s++) { statsPrintf("gen[%d].steps[%d].sync_large_objects: %"FMT_Word64"\n", g, s, generations[g].steps[s].sync_large_objects.spin); diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c index b711914..c40d18b 100644 --- a/rts/sm/Evac.c +++ b/rts/sm/Evac.c @@ -25,7 +25,7 @@ #include "LdvProfile.h" #if defined(PROF_SPIN) && defined(THREADED_RTS) && defined(PARALLEL_GC) -StgWord64 whitehole_spin = 0; +StgWord64 evac_collision = 0; #endif #if defined(THREADED_RTS) && !defined(PARALLEL_GC) @@ -115,7 +115,10 @@ copy_tag(StgClosure **p, const StgInfoTable *info, new_info = (const StgInfoTable *)cas((StgPtr)&src->header.info, (W_)info, MK_FORWARDING_PTR(to)); if (new_info != info) { - return evacuate(p); // does the failed_to_evac stuff +#if defined(PROF_SPIN) + evac_collision++; +#endif + evacuate(p); // does the failed_to_evac stuff } else { *p = TAG_CLOSURE(tag,(StgClosure*)to); } @@ -191,6 +194,9 @@ copyPart(StgClosure **p, const StgInfoTable *info, StgClosure *src, new_info = (const StgInfoTable *)cas((StgPtr)&src->header.info, (W_)info, MK_FORWARDING_PTR(to)); if (new_info != info) { +#if defined(PROF_SPIN) + evac_collision++; +#endif evacuate(p); // does the failed_to_evac stuff return rtsFalse; } else { diff --git a/rts/sm/GC.h b/rts/sm/GC.h index e746f09..675d323 100644 --- a/rts/sm/GC.h +++ b/rts/sm/GC.h @@ -42,7 +42,7 @@ extern nat mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS, mutlist_OTHERS; #endif #if defined(PROF_SPIN) && defined(THREADED_RTS) -extern StgWord64 whitehole_spin; +extern StgWord64 evac_collision; #endif void gcWorkerThread (Capability *cap); diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index 59a41b0..19ccdfb 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -253,7 +253,7 @@ initStorage( void ) #ifdef THREADED_RTS initSpinLock(&gc_alloc_block_sync); - whitehole_spin = 0; + evac_collision = 0; #endif N = 0;