diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-09-07 09:28:36 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-09-07 09:58:28 +0300 |
commit | d9a26c7e8d9bb96ccb676d6a23da21b64559c7c2 (patch) | |
tree | c7230419c1bc50bb38c8a12b8107893f33bf9917 /rts | |
parent | c6fbac6a6a69a2f4be89701b2c386ae53214f9a3 (diff) | |
download | haskell-d9a26c7e8d9bb96ccb676d6a23da21b64559c7c2.tar.gz |
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
Diffstat (limited to 'rts')
-rw-r--r-- | rts/RetainerProfile.c | 3 | ||||
-rw-r--r-- | rts/StgMiscClosures.cmm | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c index d67eeb4834..23f46e0714 100644 --- a/rts/RetainerProfile.c +++ b/rts/RetainerProfile.c @@ -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); diff --git a/rts/StgMiscClosures.cmm b/rts/StgMiscClosures.cmm index e645442033..36fd66901b 100644 --- a/rts/StgMiscClosures.cmm +++ b/rts/StgMiscClosures.cmm @@ -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 */ |