-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
bootstrap: build code cache from deserialized isolate #49099
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
V8 now requires the code cache to be compiled with a finalized read-only space, so we need to serialize the snapshot to get a finalized read-only space first, then deserialize it to compile the code cache.
Review requested:
|
I am making this draft because there could be a better alternative: we can also compile all the builtins (but do not actually load them) from the JS land during the snapshot building process. With |
hmm, giving it another look, I think we could only remove the C++ land code cache after we extend the worker snapshot to include the builtin loader, otherwise it would be a startup performance regression for workers, so that might involve a bit more work than I thought, meanwhile we could probably do this PR first to make it work with the latest V8. |
Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
Commit Queue failed- Loading data for nodejs/node/pull/49099 ✔ Done loading data for nodejs/node/pull/49099 ----------------------------------- PR info ------------------------------------ Title bootstrap: build code cache from deserialized isolate (#49099) Author Joyee Cheung (@joyeecheung) Branch joyeecheung:snapshot-des -> nodejs:main Labels c++, needs-ci, commit-queue-squash Commits 2 - bootstrap: build code cache from deserialized isolate - fixup! bootstrap: build code cache from deserialized isolate Committers 2 - Joyee Cheung - GitHub PR-URL: https://github.com/nodejs/node/pull/49099 Refs: https://github.com/nodejs/node/issues/47636 Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13789 Reviewed-By: Yagiz Nizipli ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/49099 Refs: https://github.com/nodejs/node/issues/47636 Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13789 Reviewed-By: Yagiz Nizipli -------------------------------------------------------------------------------- ℹ This PR was created on Thu, 10 Aug 2023 17:04:33 GMT ✔ Approvals: 1 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/49099#pullrequestreview-1581134095 ✘ This PR needs to wait 20 more hours to land (or 0 hours if there is one more approval) ✔ Last GitHub CI successful ℹ Last Full PR CI on 2023-08-16T17:23:16Z: https://ci.nodejs.org/job/node-test-pull-request/53386/ ℹ Last Benchmark CI on 2023-08-10T17:47:50Z: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1356/ - Querying data for job/node-test-pull-request/53386/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/5883429281 |
Landed in 7b7a68b |
V8 now requires the code cache to be compiled with a finalized read-only space, so we need to serialize the snapshot to get a finalized read-only space first, then deserialize it to compile the code cache. PR-URL: #49099 Refs: #47636 Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13789 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
V8 now requires the code cache to be compiled with a finalized read-only space, so we need to serialize the snapshot to get a finalized read-only space first, then deserialize it to compile the code cache.
Refs: #47636
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13789