[Git][ghc/ghc][wip/T22452] eventlog: Ensure that IPE output contains actual info table pointers

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Fri Nov 11 16:27:55 UTC 2022



Ben Gamari pushed to branch wip/T22452 at Glasgow Haskell Compiler / GHC


Commits:
9b0a5524 by Ben Gamari at 2022-11-11T11:27:44-05:00
eventlog: Ensure that IPE output contains actual info table pointers

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.

- - - - -


2 changed files:

- rts/eventlog/EventLog.c
- rts/include/rts/IPE.h


Changes:

=====================================
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);


=====================================
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;



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9b0a5524c12d604b0880357adfafc82e8e936f57

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9b0a5524c12d604b0880357adfafc82e8e936f57
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221111/5c521690/attachment-0001.html>


More information about the ghc-commits mailing list