diff options
author | Douglas Wilson <douglas.wilson@gmail.com> | 2021-01-04 12:24:25 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-17 05:49:54 -0500 |
commit | f2d118c0a018dccd3c82e885f500d4e57ff94f82 (patch) | |
tree | 32a8a499034557c4725936922c870c901519a42b /rts/sm | |
parent | f395c2cb2e6bb0b9f9f3d6deb923c72fe7433d37 (diff) | |
download | haskell-f2d118c0a018dccd3c82e885f500d4e57ff94f82.tar.gz |
rts: remove no_work counter
We are no longer busyish waiting, so this is no longer meaningful
Diffstat (limited to 'rts/sm')
-rw-r--r-- | rts/sm/GC.c | 11 | ||||
-rw-r--r-- | rts/sm/GCThread.h | 1 | ||||
-rw-r--r-- | rts/sm/GCUtils.c | 3 |
3 files changed, 3 insertions, 12 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 64a4c071b6..b78f993260 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -270,7 +270,7 @@ GarbageCollect (uint32_t collect_gen, generation *gen; StgWord live_blocks, live_words, par_max_copied, par_balanced_copied, gc_spin_spin, gc_spin_yield, mut_spin_spin, mut_spin_yield, - any_work, no_work, scav_find_work; + any_work, scav_find_work; #if defined(THREADED_RTS) gc_thread *saved_gct; #endif @@ -593,7 +593,6 @@ GarbageCollect (uint32_t collect_gen, mut_spin_spin = 0; mut_spin_yield = 0; any_work = 0; - no_work = 0; scav_find_work = 0; { uint32_t i; @@ -614,8 +613,6 @@ GarbageCollect (uint32_t collect_gen, RELAXED_LOAD(&thread->scanned) * sizeof(W_)); debugTrace(DEBUG_gc," any_work %ld", RELAXED_LOAD(&thread->any_work)); - debugTrace(DEBUG_gc," no_work %ld", - RELAXED_LOAD(&thread->no_work)); debugTrace(DEBUG_gc," scav_find_work %ld", RELAXED_LOAD(&thread->scav_find_work)); @@ -627,7 +624,6 @@ GarbageCollect (uint32_t collect_gen, #endif any_work += RELAXED_LOAD(&thread->any_work); - no_work += RELAXED_LOAD(&thread->no_work); scav_find_work += RELAXED_LOAD(&thread->scav_find_work); par_max_copied = stg_max(RELAXED_LOAD(&thread->copied), par_max_copied); @@ -1047,7 +1043,7 @@ GarbageCollect (uint32_t collect_gen, N, n_gc_threads, gc_threads, par_max_copied, par_balanced_copied, gc_spin_spin, gc_spin_yield, mut_spin_spin, mut_spin_yield, - any_work, no_work, scav_find_work); + any_work, scav_find_work); #if defined(RTS_USER_SIGNALS) if (RtsFlags.MiscFlags.install_signal_handlers) { @@ -1188,7 +1184,6 @@ freeGcThreads (void) closeCondition(&gc_running_cv); closeMutex(&gc_running_mutex); stgFree (gc_threads); - #else for (g = 0; g < RtsFlags.GcFlags.generations; g++) { @@ -1320,7 +1315,6 @@ scavenge_until_all_done (void) traceEventGcWork(gct->cap); continue; // for(;;) loop } - NONATOMIC_ADD(&gct->no_work, 1); } #endif break; // for(;;) loop @@ -1808,7 +1802,6 @@ init_gc_thread (gc_thread *t) t->copied = 0; t->scanned = 0; t->any_work = 0; - t->no_work = 0; t->scav_find_work = 0; } diff --git a/rts/sm/GCThread.h b/rts/sm/GCThread.h index d15189988d..90d15c69c5 100644 --- a/rts/sm/GCThread.h +++ b/rts/sm/GCThread.h @@ -182,7 +182,6 @@ typedef struct gc_thread_ { W_ copied; W_ scanned; W_ any_work; - W_ no_work; W_ scav_find_work; Time gc_start_cpu; // thread CPU time diff --git a/rts/sm/GCUtils.c b/rts/sm/GCUtils.c index ea7d83ab8f..89a92bc837 100644 --- a/rts/sm/GCUtils.c +++ b/rts/sm/GCUtils.c @@ -129,8 +129,7 @@ steal_todo_block (uint32_t g) // look for work to steal for (n = 0; n < n_gc_threads; n++) { if (n == gct->thread_index) continue; - q = gc_threads[n]->gens[g].todo_q; - bd = stealWSDeque(q); + bd = stealWSDeque(gc_threads[n]->gens[g].todo_q); if (bd) { return bd; } |