Commit e9655493 authored by Simon Marlow's avatar Simon Marlow

rename whitehole_spin to evac_collision, and update it properly

parent 68bc07fe
......@@ -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);
......
......@@ -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 {
......
......@@ -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);
......
......@@ -253,7 +253,7 @@ initStorage( void )
#ifdef THREADED_RTS
initSpinLock(&gc_alloc_block_sync);
whitehole_spin = 0;
evac_collision = 0;
#endif
N = 0;
......
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