X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=ghc%2Fruntime%2Fmain%2FStgUpdate.lhc;h=04d2a5c96bc9d4e5d8b1b04b59d9c6b2587bf1c7;hp=e0cb2458b96a57f9fb972b5e56cfd9e5daf8b20c;hb=5eb1c77c795f92ed0f4c8023847e9d4be1a4fd0d;hpb=10521d8418fd3a1cf32882718b5bd28992db36fd diff --git a/ghc/runtime/main/StgUpdate.lhc b/ghc/runtime/main/StgUpdate.lhc index e0cb245..04d2a5c 100644 --- a/ghc/runtime/main/StgUpdate.lhc +++ b/ghc/runtime/main/StgUpdate.lhc @@ -7,10 +7,6 @@ This code is required by the update interface which sits on top of the storage manager interface (See \tr{SMupdate.lh}). -Some of this stuff has been separated (correctly!) into StgThreads.lhc -for version 0.23. Could someone (Hans?) bring us up to date, please! -KH. - \begin{itemize} \item Indirection entry code and info table. \item Black Hole entry code and info table. @@ -31,7 +27,7 @@ System-wide constants need to be included: #endif #endif -EXTDATA(Nil_closure); +EXTDATA(Prelude_Z91Z93_closure); #if defined(TICKY_TICKY) void PrintTickyInfo(STG_NO_ARGS); @@ -130,15 +126,16 @@ STGFUN(BH_UPD_entry) FB_ # if 0 - if ( debug & 0x80 ) + if ( RTSflags.GranFlags.debug & 0x80 ) (void) STGCALL4(int,(),fprintf,stderr,"GRAN_CHECK in BH_UPD_entry: Entered a `black hole' @ 0x%x (CurrentTSO @ 0x%x\n ",Node,CurrentTSO); -#endif +# endif # if defined(GRAN) - STGCALL0(void,(),GranSimBlock); /* Do this before losing its TSO_LINK */ + /* Do this before losing its TSO_LINK */ + STGCALL3(void,(),GranSimBlock,CurrentTSO,CurrentProc,Node); # endif - TSO_LINK(CurrentTSO) = Nil_closure; + TSO_LINK(CurrentTSO) = Prelude_Z91Z93_closure; SET_INFO_PTR(Node, BQ_info); BQ_ENTRIES(Node) = (W_) CurrentTSO; @@ -173,8 +170,8 @@ STGFUN(BH_UPD_entry) # endif # if defined(GRAN) - /* CurrentTSO = Nil_closure; */ - ReSchedule(NEW_THREAD); + /* CurrentTSO = Prelude_Z91Z93_closure; */ + ReSchedule(SAME_THREAD); # else ReSchedule(0); # endif @@ -394,7 +391,7 @@ STGFUN(Perm_Ind_entry) /* Don't add INDs to granularity cost */ - /* Dont: ENT_IND(Node); for ticky-ticky; this ind is here only to help ticky */ + /* Dont: ENT_IND(Node); for ticky-ticky; this ind is here only to help profiling */ /* Enter PAP cost centre -- lexical scoping only */ ENTER_CC_PAP_CL(Node); @@ -405,9 +402,6 @@ STGFUN(Perm_Ind_entry) InfoPtr=(D_)(INFO_PTR(Node)); -# if defined(GRAN) - GRAN_EXEC(1,1,2,0,0); -# endif JMP_(ENTRY_CODE(InfoPtr)); FE_ } @@ -469,7 +463,7 @@ STGFUN(UpdatePAP) FB_ -#if defined(COUNT) +#if defined(GRAN_COUNT) ++nPAPs; #endif @@ -485,7 +479,7 @@ STGFUN(UpdatePAP) /* set "CC_pap" to go in the updatee (see Sansom thesis, p 183) */ CC_pap /*really cc_enter*/ = (CostCentre) CC_HDR(Node); - if (IS_SUBSUMED_CC(CC_pap) /*really cc_enter*/) + if (IS_CAF_OR_DICT_OR_SUB_CC(CC_pap) /*really cc_enter*/) CC_pap = CCC; #endif @@ -578,7 +572,7 @@ STGFUN(UpdatePAP) * Take the CC out of the update frame if a CAF/DICT. */ - CCC = (IS_CAF_OR_DICT_CC(CC_pap)) ? GRAB_COST_CENTRE(SuB) : CC_pap; + CCC = (IS_CAF_OR_DICT_OR_SUB_CC(CC_pap)) ? GRAB_COST_CENTRE(SuB) : CC_pap; #endif /* PROFILING */ @@ -602,7 +596,7 @@ STGFUN(UpdatePAP) * Don't count this entry for ticky-ticky profiling. */ -#if defined(GRAN) +#if 0 /* defined(GRAN) */ GRAN_EXEC(16,4,7,4,0); #endif InfoPtr=(D_)(INFO_PTR(Node)); @@ -664,7 +658,7 @@ STGFUN(PAP_entry) */ CC_pap = (CostCentre) CC_HDR(Node); - CCC = (IS_CAF_OR_DICT_CC(CC_pap)) ? GRAB_COST_CENTRE(SuB) : CC_pap; + CCC = (IS_CAF_OR_DICT_OR_SUB_CC(CC_pap)) ? GRAB_COST_CENTRE(SuB) : CC_pap; #endif /* PROFILING */