From: Simon Marlow Date: Wed, 16 Apr 2008 21:39:45 +0000 (+0000) Subject: anyWork(): count the number of times we don't find any work X-Git-Tag: Before_cabalised-GHC~232 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=5244f537d12bdb5e016ce7b04e9181b364e5cb27 anyWork(): count the number of times we don't find any work --- diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 250d07f..6c19a6a 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -468,6 +468,7 @@ GarbageCollect ( rtsBool force_major_gc ) trace(TRACE_gc,"thread %d:", i); trace(TRACE_gc," copied %ld", gc_threads[i]->copied * sizeof(W_)); trace(TRACE_gc," any_work %ld", gc_threads[i]->any_work); + trace(TRACE_gc," no_work %ld", gc_threads[i]->no_work); trace(TRACE_gc," scav_global_work %ld", gc_threads[i]->scav_global_work); trace(TRACE_gc," scav_local_work %ld", gc_threads[i]->scav_local_work); } @@ -1362,6 +1363,7 @@ init_gc_thread (gc_thread *t) t->thunk_selector_depth = 0; t->copied = 0; t->any_work = 0; + t->no_work = 0; t->scav_global_work = 0; t->scav_local_work = 0; } diff --git a/rts/sm/GC.h b/rts/sm/GC.h index 5183837..58aa46f 100644 --- a/rts/sm/GC.h +++ b/rts/sm/GC.h @@ -152,6 +152,7 @@ typedef struct gc_thread_ { lnat copied; lnat any_work; + lnat no_work; lnat scav_global_work; lnat scav_local_work; diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c index 674078f..4ba80c4 100644 --- a/rts/sm/Scav.c +++ b/rts/sm/Scav.c @@ -1582,5 +1582,7 @@ any_work (void) if (ws->stp->todos) return rtsTrue; } + gct->no_work++; + return rtsFalse; }