summaryrefslogtreecommitdiff
path: root/rts/RtsStartup.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-08-18 20:03:15 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-10-11 23:45:10 -0400
commit6b0d2022699d3d8b446d024ee837c0d07e2c1aa0 (patch)
tree3981c27bcbfd7ac99eb5c0b46cea5090d8a27ec9 /rts/RtsStartup.c
parent866c736ef29a07c6f3aa68063ef98ee0ecea12f3 (diff)
downloadhaskell-6b0d2022699d3d8b446d024ee837c0d07e2c1aa0.tar.gz
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.
Diffstat (limited to 'rts/RtsStartup.c')
-rw-r--r--rts/RtsStartup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c
index 5a2c616a73..8ec69f84ab 100644
--- a/rts/RtsStartup.c
+++ b/rts/RtsStartup.c
@@ -386,7 +386,7 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
#if defined(PROFILING)
initProfiling();
#endif
- initIpeMapLock();
+ initIpe();
traceInitEvent(dumpIPEToEventLog);
initHeapProfiling();
@@ -611,7 +611,7 @@ hs_exit_(bool wait_foreign)
// Free threading resources
freeThreadingResources();
- closeIpeMapLock();
+ exitIpe();
}
// Flush stdout and stderr. We do this during shutdown so that it