[Git][ghc/ghc][master] 2 commits: wasm: bump dyld v8 heap size limit
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sat Feb 22 12:41:34 UTC 2025
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
fbf3d020 by Cheng Shao at 2025-02-22T07:41:01-05:00
wasm: bump dyld v8 heap size limit
This patch sets `--max-old-space-size=65536` as wasm dyld shebang
arguments to lessen v8 heap pressure in certain workloads that load
the full ghc package. It doesn't really commit 64G memory but it does
help reduce v8 gc overhead.
- - - - -
cb60da24 by Cheng Shao at 2025-02-22T07:41:01-05:00
wasm: fix dyld for shared libraries created by llvm 20.x
This patch fixes wasm dyld script for shared libraries created by llvm
20.x. The __wasm_apply_data_relocs function is now optional and may be
omitted for shared libraries without any runtime relocatable data
segments, so only call __wasm_apply_data_relocs when it's present.
- - - - -
1 changed file:
- utils/jsffi/dyld.mjs
Changes:
=====================================
utils/jsffi/dyld.mjs
=====================================
@@ -1,4 +1,4 @@
-#!/usr/bin/env -S node --disable-warning=ExperimentalWarning --experimental-wasm-type-reflection --max-old-space-size=8192 --no-turbo-fast-api-calls --wasm-lazy-validation
+#!/usr/bin/env -S node --disable-warning=ExperimentalWarning --experimental-wasm-type-reflection --max-old-space-size=65536 --no-turbo-fast-api-calls --wasm-lazy-validation
// Note [The Wasm Dynamic Linker]
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -796,12 +796,17 @@ class DyLD {
const init = () => {
// See
- // https://github.com/llvm/llvm-project/blob/llvmorg-19.1.1/lld/wasm/Writer.cpp#L1430,
- // there's also __wasm_init_memory (not relevant yet, we don't
+ // https://gitlab.haskell.org/haskell-wasm/llvm-project/-/blob/release/20.x/lld/wasm/Writer.cpp#L1450,
+ // __wasm_apply_data_relocs is now optional so only call it if
+ // it exists (we know for sure it exists for libc.so though).
+ // There's also __wasm_init_memory (not relevant yet, we don't
// use passive segments) & __wasm_apply_global_relocs but
// those are included in the start function and should have
- // been called upon instantiation.
- instance.exports.__wasm_apply_data_relocs();
+ // been called upon instantiation, see
+ // Writer::createStartFunction().
+ if (instance.exports.__wasm_apply_data_relocs) {
+ instance.exports.__wasm_apply_data_relocs();
+ }
instance.exports._initialize();
};
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/549e0aff175ba75ed1461563c0641837fd6aad78...cb60da245b2fea7a0c39af0e58f9ef89104a9255
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/549e0aff175ba75ed1461563c0641837fd6aad78...cb60da245b2fea7a0c39af0e58f9ef89104a9255
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/20250222/fef0d284/attachment-0001.html>
More information about the ghc-commits
mailing list