[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:44 UTC 2022



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


Commits:
d90d7165 by Ben Gamari at 2022-11-11T11:26:01-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).

- - - - -


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/d90d716517ad523e3d5785b205bfeeed6c64e9a9

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d90d716517ad523e3d5785b205bfeeed6c64e9a9
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/64eefa52/attachment-0001.html>


More information about the ghc-commits mailing list