Commit d9a26c7e authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan

Various RTS bug fixes:

- Retainer profiler: init_srt_thunk() should mark the stack entry as SRT
- Retainer profiler: Remove an incorrect assertion about FUN_STATIC.
  FUN_STATIC does not have to have an SRT.
- Fix nptrs of BCO

Test Plan: validate

Reviewers: simonmar, bgamari, erikd

Reviewed By: simonmar

Subscribers: rwbarton, carter

Differential Revision: https://phabricator.haskell.org/D5134
parent c6fbac6a
......@@ -337,6 +337,7 @@ init_srt_fun( stackPos *info, const StgFunInfoTable *infoTable )
static INLINE void
init_srt_thunk( stackPos *info, const StgThunkInfoTable *infoTable )
{
info->type = posTypeSRT;
if (infoTable->i.srt) {
info->next.srt.srt = (StgClosure*)GET_SRT(infoTable);
} else {
......@@ -489,8 +490,6 @@ push( StgClosure *c, retainer c_child_r, StgClosure **first_child )
// layout.payload.ptrs, SRT
case FUN_STATIC:
ASSERT(get_itbl(c)->srt != 0);
/* fallthrough */
case FUN: // *c is a heap object.
case FUN_2_0:
init_ptrs(&se.info, get_itbl(c)->layout.payload.ptrs, (StgPtr)c->payload);
......
......@@ -211,7 +211,7 @@ INFO_TABLE_RET( stg_apply_interp, RET_BCO )
Entry code for a BCO
------------------------------------------------------------------------- */
INFO_TABLE_FUN( stg_BCO, 4, 0, BCO, "BCO", "BCO", ARG_BCO )
INFO_TABLE_FUN( stg_BCO, 3, 0, BCO, "BCO", "BCO", ARG_BCO )
/* explicit stack */
{
/* entering a BCO means "apply it", same as a function */
......
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