X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRetainerProfile.c;h=17f5afb615d3cdd305334260437db429e2a88b54;hb=3cdb0ada5aecbcbe940bacf577c02c41bc65c629;hp=a18a194c0297f43dd77e548d4d53f0b765c40d5c;hpb=a0be7e7ccd602efd9b7d35b3e0747a2c4f155ce9;p=ghc-hetmet.git diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c index a18a194..17f5afb 100644 --- a/rts/RetainerProfile.c +++ b/rts/RetainerProfile.c @@ -20,15 +20,15 @@ #include "RtsUtils.h" #include "RetainerProfile.h" #include "RetainerSet.h" +#include "Storage.h" #include "Schedule.h" +#include "Stable.h" #include "Printer.h" -#include "Storage.h" #include "RtsFlags.h" #include "Weak.h" #include "Sanity.h" #include "Profiling.h" #include "Stats.h" -#include "BlockAlloc.h" #include "ProfHeap.h" #include "Apply.h" @@ -591,8 +591,8 @@ push( StgClosure *c, retainer c_child_r, StgClosure **first_child ) return; // no child break; - case TVAR_WAIT_QUEUE: - *first_child = (StgClosure *)((StgTVarWaitQueue *)c)->waiting_tso; + case TVAR_WATCH_QUEUE: + *first_child = (StgClosure *)((StgTVarWatchQueue *)c)->closure; se.info.next.step = 2; // 2 = second break; case TVAR: @@ -662,6 +662,12 @@ push( StgClosure *c, retainer c_child_r, StgClosure **first_child ) // following statement by either a memcpy() call or a switch statement // on the type of the element. Currently, the size of stackElement is // small enough (5 words) that this direct assignment seems to be enough. + + // ToDo: The line below leads to the warning: + // warning: 'se.info.type' may be used uninitialized in this function + // This is caused by the fact that there are execution paths through the + // large switch statement above where some cases do not initialize this + // field. Is this really harmless? Can we avoid the warning? *stackTop = se; #ifdef DEBUG_RETAINER @@ -830,13 +836,13 @@ pop( StgClosure **c, StgClosure **cp, retainer *r ) *r = se->c_child_r; return; - case TVAR_WAIT_QUEUE: + case TVAR_WATCH_QUEUE: if (se->info.next.step == 2) { - *c = (StgClosure *)((StgTVarWaitQueue *)se->c)->next_queue_entry; + *c = (StgClosure *)((StgTVarWatchQueue *)se->c)->next_queue_entry; se->info.next.step++; // move to the next step // no popOff } else { - *c = (StgClosure *)((StgTVarWaitQueue *)se->c)->prev_queue_entry; + *c = (StgClosure *)((StgTVarWatchQueue *)se->c)->prev_queue_entry; popOff(); } *cp = se->c; @@ -844,7 +850,7 @@ pop( StgClosure **c, StgClosure **cp, retainer *r ) return; case TVAR: - *c = (StgClosure *)((StgTVar *)se->c)->first_wait_queue_entry; + *c = (StgClosure *)((StgTVar *)se->c)->first_watch_queue_entry; *cp = se->c; *r = se->c_child_r; popOff(); @@ -1125,7 +1131,7 @@ isRetainer( StgClosure *c ) case BCO: case ARR_WORDS: // STM - case TVAR_WAIT_QUEUE: + case TVAR_WATCH_QUEUE: case TREC_HEADER: case TREC_CHUNK: return rtsFalse;