diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-11-11 11:23:05 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-11-11 11:27:44 -0500 |
commit | 9b0a5524c12d604b0880357adfafc82e8e936f57 (patch) | |
tree | 3b6d6954b9af8f379ea7cc7bb99dd5f59abefd75 | |
parent | 707d5651e17c8cbc95c67f89a3dca7a4d4b03e49 (diff) | |
download | haskell-wip/T22452.tar.gz |
eventlog: Ensure that IPE output contains actual info table pointerswip/T22452
The refactoring in 866c736e introduced a rather subtle change in the
semantics of the IPE eventlog output, changing the eventlog field from
encoding info table pointers to "TNTC pointers" (which point to entry
code when tables-next-to-code is enabled). Fix this.
Fixes #22452.
-rw-r--r-- | rts/eventlog/EventLog.c | 2 | ||||
-rw-r--r-- | rts/include/rts/IPE.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c index 9b10666768..53d5e28a61 100644 --- a/rts/eventlog/EventLog.c +++ b/rts/eventlog/EventLog.c @@ -1429,7 +1429,7 @@ void postIPE(const InfoProvEnt *ipe) ensureRoomForVariableEvent(&eventBuf, len); postEventHeader(&eventBuf, EVENT_IPE); postPayloadSize(&eventBuf, len); - postWord64(&eventBuf, (StgWord) ipe->info); + postWord64(&eventBuf, (StgWord) INFO_PTR_TO_STRUCT(ipe->info)); postString(&eventBuf, ipe->prov.table_name); postString(&eventBuf, ipe->prov.closure_desc); postString(&eventBuf, ipe->prov.ty_desc); diff --git a/rts/include/rts/IPE.h b/rts/include/rts/IPE.h index 4d83629a58..f6d3607d1b 100644 --- a/rts/include/rts/IPE.h +++ b/rts/include/rts/IPE.h @@ -24,6 +24,8 @@ typedef struct InfoProv_ { } InfoProv; typedef struct InfoProvEnt_ { + // When TNTC is enabled this will point to the entry code + // not the info table itself. const StgInfoTable *info; InfoProv prov; } InfoProvEnt; @@ -50,6 +52,8 @@ typedef uint32_t StringIdx; // The size of this must be a multiple of the word size // to ensure correct packing. typedef struct { + // When TNTC is enabled this will point to the entry code + // not the info table itself. const StgInfoTable *info; StringIdx table_name; StringIdx closure_desc; |