[Git][ghc/ghc][wip/T22077] 2 commits: Refactor IPE initialization

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Thu Aug 25 19:34:47 UTC 2022



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


Commits:
80f59ae4 by Ben Gamari at 2022-08-25T15:34:35-04:00
Refactor IPE initialization

Here we refactor the representation of info table provenance information
in object code to significantly reduce its size and link-time impact.
Specifically, we deduplicate strings and represent them as 32-bit
offsets into a common string table.

In addition, we rework the registration logic to eliminate allocation
from the registration path, which is run from a static initializer where
things like allocation are technically undefined behavior (although it
did previously seem to work). For similar reasons we eliminate lock
usage from registration path, instead relying on atomic CAS.

Closes #22077.

- - - - -
f932de0a by Ben Gamari at 2022-08-25T15:34:35-04:00
Separate IPE source file from span

The source file name can very often be shared across many IPE entries
whereas the source coordinates are generally unique. Separate the two to
exploit sharing of the former.

- - - - -


30 changed files:

- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/Driver/Main.hs
- + compiler/GHC/StgToCmm/InfoTableProv.hs
- compiler/GHC/StgToCmm/Prof.hs
- compiler/ghc.cabal.in
- libraries/base/GHC/InfoProv.hsc
- libraries/base/GHC/Stack/CloneStack.hs
- rts/IPE.c
- rts/IPE.h
- rts/RtsStartup.c
- rts/Trace.c
- rts/eventlog/EventLog.c
- rts/include/Cmm.h
- rts/include/Rts.h
- rts/include/rts/IPE.h
- rts/include/stg/SMP.h
- rts/sm/NonMoving.h
- testsuite/tests/profiling/should_run/staticcallstack001.stdout
- testsuite/tests/profiling/should_run/staticcallstack002.stdout
- testsuite/tests/rts/all.T
- + testsuite/tests/rts/ipe/all.T
- + testsuite/tests/rts/ipe/ipeEventLog.c
- + testsuite/tests/rts/ipe/ipeEventLog.stderr
- testsuite/tests/rts/ipeEventLog_fromMap.c → testsuite/tests/rts/ipe/ipeEventLog_fromMap.c
- + testsuite/tests/rts/ipe/ipeEventLog_fromMap.stderr
- testsuite/tests/rts/ipeMap.c → testsuite/tests/rts/ipe/ipeMap.c
- testsuite/tests/rts/ipeEventLog_lib.c → testsuite/tests/rts/ipe/ipe_lib.c
- + testsuite/tests/rts/ipe/ipe_lib.h


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c0869845f27fd6e1377c7f771a9c842ed769cb0e...f932de0a2e9734bcac44c6d1eab0274dfba9d55a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c0869845f27fd6e1377c7f771a9c842ed769cb0e...f932de0a2e9734bcac44c6d1eab0274dfba9d55a
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/20220825/82d07a2e/attachment.html>


More information about the ghc-commits mailing list