[Git][ghc/ghc][wip/T24504] IPE: WIP: Replace closure_desc string representation in logs output on Word64

Serge S. Gulin (@gulin.serge) gitlab at gitlab.haskell.org
Tue May 7 09:44:49 UTC 2024



Serge S. Gulin pushed to branch wip/T24504 at Glasgow Haskell Compiler / GHC


Commits:
7b7db94b by Serge S. Gulin at 2024-05-07T12:44:36+03:00
IPE: WIP: Replace closure_desc string representation in logs output on Word64

- - - - -


1 changed file:

- rts/eventlog/EventLog.c


Changes:

=====================================
rts/eventlog/EventLog.c
=====================================
@@ -1445,7 +1445,6 @@ void postIPE(const InfoProvEnt *ipe)
     const StgWord MAX_IPE_STRING_LEN = 65535;
     ACQUIRE_LOCK(&eventBufMutex);
     StgWord table_name_len = MIN(strlen(ipe->prov.table_name), MAX_IPE_STRING_LEN);
-    StgWord closure_desc_len = MIN(strlen(ipe->prov.closure_desc), MAX_IPE_STRING_LEN);
     StgWord ty_desc_len = MIN(strlen(ipe->prov.ty_desc), MAX_IPE_STRING_LEN);
     StgWord label_len = MIN(strlen(ipe->prov.label), MAX_IPE_STRING_LEN);
     StgWord module_len = MIN(strlen(ipe->prov.module), MAX_IPE_STRING_LEN);
@@ -1455,14 +1454,15 @@ void postIPE(const InfoProvEnt *ipe)
     // 8 for the info word
     // 1 null after each string
     // 1 colon between src_file and src_span
+    // 8 for the closure_desc
     StgWord extra_comma = 1;
-    StgWord len = 8+table_name_len+1+closure_desc_len+1+ty_desc_len+1+label_len+1+module_len+1+src_file_len+1+extra_comma+src_span_len+1;
+    StgWord len = 8+table_name_len+1+8+1+ty_desc_len+1+label_len+1+module_len+1+src_file_len+1+extra_comma+src_span_len+1;
     CHECK(!ensureRoomForVariableEvent(&eventBuf, len));
     postEventHeader(&eventBuf, EVENT_IPE);
     postPayloadSize(&eventBuf, len);
     postWord64(&eventBuf, (StgWord) INFO_PTR_TO_STRUCT(ipe->info));
     postStringLen(&eventBuf, ipe->prov.table_name, table_name_len);
-    postStringLen(&eventBuf, ipe->prov.closure_desc, closure_desc_len);
+    postWord64(&eventBuf, ipe->prov.closure_desc);
     postStringLen(&eventBuf, ipe->prov.ty_desc, ty_desc_len);
     postStringLen(&eventBuf, ipe->prov.label, label_len);
     postStringLen(&eventBuf, ipe->prov.module, module_len);



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7b7db94bb5ffe0ff2425117418eba89342037789

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


More information about the ghc-commits mailing list