bootstrap: implement run-time user-land snapshots via --build-snapshot and --snapshot-blob by joyeecheung · Pull Request #38905 · nodejs/node

@github-actions bot added c++

Issues and PRs that require attention from people who are familiar with C++.

lib / src

Issues and PRs related to general changes in the lib or src directory.

needs-ci

PRs that need a full CI run.

labels

Jun 2, 2021

addaleax

This was referenced

Jun 11, 2021

joyeecheung added a commit that referenced this pull request

Jun 21, 2021
Split the running of the instance so that it can be reused
by the snapshot builder when we need to run the loop for
user code.

PR-URL: #39007
Refs: #35711
Refs: #38905
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

joyeecheung added a commit that referenced this pull request

Jun 21, 2021
This is only necessary for the snapshot builder (because we
have no way to resurrect the handles at the moment). In addition,
print the handles if the debug flag is set or if the queues
are not empty after snapshot is created.

PR-URL: #39007
Refs: #35711
Refs: #38905
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

danielleadams pushed a commit that referenced this pull request

Jun 21, 2021
Split the running of the instance so that it can be reused
by the snapshot builder when we need to run the loop for
user code.

PR-URL: #39007
Refs: #35711
Refs: #38905
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

danielleadams pushed a commit that referenced this pull request

Jun 21, 2021
This is only necessary for the snapshot builder (because we
have no way to resurrect the handles at the moment). In addition,
print the handles if the debug flag is set or if the queues
are not empty after snapshot is created.

PR-URL: #39007
Refs: #35711
Refs: #38905
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

joyeecheung added a commit that referenced this pull request

Jun 21, 2021
This way, internal modules can still require the module
and cache the function getOptionValue() early (therefore
these code can be included in the snapshots), but the
options map won't be serialized from C++ land until the
option values are actually queried.

PR-URL: #38993
Refs: #35711
Refs: #38905
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: nodejs#38905
Refs: nodejs#35711
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

@joyeecheung

legendecas

mcollina

This was referenced

Aug 5, 2022

@meixg meixg mentioned this pull request

Aug 10, 2022

This was referenced

Aug 16, 2022

This was referenced

Aug 16, 2022

This was referenced

Aug 23, 2022