Commit de45acb0 authored by Ben Gamari's avatar Ben Gamari 🐢

XXX: Indirection counting

parent 41abcf4f
......@@ -601,6 +601,8 @@ stat_endGC (Capability *cap, gc_thread *initiating_gct, W_ live, W_ copied, W_ s
}
}
StgWord ben_IND=0;
/* -----------------------------------------------------------------------------
Called at the beginning of each Retainer Profiliing
-------------------------------------------------------------------------- */
......@@ -766,6 +768,8 @@ static void free_RTSSummaryStats(RTSSummaryStats * sum)
static void report_summary(const RTSSummaryStats* sum)
{
statsPrintf("ben_IND %lu\n", ben_IND);
// We should do no calculation, other than unit changes and formatting, and
// we should not not use any data from outside of globals, sum and stats
// here. See Note [RTS Stats Reporting]
......
......@@ -244,6 +244,7 @@ INFO_TABLE(stg_IND,1,0,IND,"IND","IND")
TICK_ENT_DYN_IND(); /* tick */
node = UNTAG(StgInd_indirectee(node));
TICK_ENT_VIA_NODE();
W_[ben_IND] = W_[ben_IND] + 1;
jump %GET_ENTRY(node) (node);
}
#else
......@@ -252,6 +253,7 @@ INFO_TABLE(stg_IND,1,0,IND,"IND","IND")
TICK_ENT_DYN_IND(); /* tick */
R1 = UNTAG(StgInd_indirectee(R1));
TICK_ENT_VIA_NODE();
W_[ben_IND] = W_[ben_IND] + 1;
jump %GET_ENTRY(R1) [R1];
}
#endif
......@@ -262,6 +264,7 @@ INFO_TABLE(stg_IND_direct,1,0,IND,"IND","IND")
TICK_ENT_DYN_IND(); /* tick */
node = StgInd_indirectee(node);
TICK_ENT_VIA_NODE();
W_[ben_IND] = W_[ben_IND] + 1;
jump %ENTRY_CODE(Sp(0)) (node);
}
......@@ -290,6 +293,7 @@ INFO_TABLE(stg_BLACKHOLE,1,0,BLACKHOLE,"BLACKHOLE","BLACKHOLE")
P_ p, bq, msg;
TICK_ENT_DYN_IND(); /* tick */
W_[ben_IND] = W_[ben_IND] + 1;
retry:
prim_read_barrier;
......
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