◐ Shell
clean mode source ↗

bootstrap: reorganize the bootstrap process by joyeecheung · Pull Request #27539 · nodejs/node

@nodejs-github-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.

labels

May 2, 2019
Inline `ProcessCliArgs()` in the `Environment` constructor, and
emit the `Environment` creation trace events with the arguments
earlier. Remove the unused arguments passed to `CreateProcessObject()`
since these are now attached to process in `PatchProcessObject()`
during pre-execution instead.
Move creation of `env->as_callback_data()`, `env->primordials()`
and `env->process()` into `Environment::CreateProperties()` and
call it in the `Environment` constructor - this can be replaced with
deserialization when we snapshot the per-environment properties
after the instantiation of `Environment`.
- Split the initialization of the inspector and other diagnostics
  into `Environment::InitializeInspector()` and
  `Environment::InitializeDiagnostics()` - these need to be
  reinitialized separately after snapshot deserialization.
- Do not store worker url alongside the inspector parent handle,
  instead just get it from the handle.
- Rename `Worker::profiler_idle_notifier_started_` to
  `Worker::start_profiler_idle_notifier_` because it stores
  the state inherited from the parent env to use for initializing
  itself.
Split `RunBootstrapping()` into `BootstrapInternalLoaders()`
and `BootstrapNode()` from so the two can be snapshotted
incrementally.

addaleax

@joyeecheung

addaleax

@joyeecheung

joyeecheung added a commit that referenced this pull request

Jun 3, 2019
Inline `ProcessCliArgs()` in the `Environment` constructor, and
emit the `Environment` creation trace events with the arguments
earlier. Remove the unused arguments passed to `CreateProcessObject()`
since these are now attached to process in `PatchProcessObject()`
during pre-execution instead.

PR-URL: #27539
Reviewed-By: Anna Henningsen <anna@addaleax.net>

joyeecheung added a commit that referenced this pull request

Jun 3, 2019
Move creation of `env->as_callback_data()`, `env->primordials()`
and `env->process()` into `Environment::CreateProperties()` and
call it in the `Environment` constructor - this can be replaced with
deserialization when we snapshot the per-environment properties
after the instantiation of `Environment`.

PR-URL: #27539
Reviewed-By: Anna Henningsen <anna@addaleax.net>

joyeecheung added a commit that referenced this pull request

Jun 3, 2019
- Split the initialization of the inspector and other diagnostics
  into `Environment::InitializeInspector()` and
  `Environment::InitializeDiagnostics()` - these need to be
  reinitialized separately after snapshot deserialization.
- Do not store worker url alongside the inspector parent handle,
  instead just get it from the handle.
- Rename `Worker::profiler_idle_notifier_started_` to
  `Worker::start_profiler_idle_notifier_` because it stores
  the state inherited from the parent env to use for initializing
  itself.

PR-URL: #27539
Reviewed-By: Anna Henningsen <anna@addaleax.net>

joyeecheung added a commit that referenced this pull request

Jun 3, 2019
Split `RunBootstrapping()` into `BootstrapInternalLoaders()`
and `BootstrapNode()` from so the two can be snapshotted
incrementally.

PR-URL: #27539
Reviewed-By: Anna Henningsen <anna@addaleax.net>

BridgeAR pushed a commit that referenced this pull request

Jun 17, 2019
Inline `ProcessCliArgs()` in the `Environment` constructor, and
emit the `Environment` creation trace events with the arguments
earlier. Remove the unused arguments passed to `CreateProcessObject()`
since these are now attached to process in `PatchProcessObject()`
during pre-execution instead.

PR-URL: #27539
Reviewed-By: Anna Henningsen <anna@addaleax.net>

BridgeAR pushed a commit that referenced this pull request

Jun 17, 2019
Move creation of `env->as_callback_data()`, `env->primordials()`
and `env->process()` into `Environment::CreateProperties()` and
call it in the `Environment` constructor - this can be replaced with
deserialization when we snapshot the per-environment properties
after the instantiation of `Environment`.

PR-URL: #27539
Reviewed-By: Anna Henningsen <anna@addaleax.net>

BridgeAR pushed a commit that referenced this pull request

Jun 17, 2019
- Split the initialization of the inspector and other diagnostics
  into `Environment::InitializeInspector()` and
  `Environment::InitializeDiagnostics()` - these need to be
  reinitialized separately after snapshot deserialization.
- Do not store worker url alongside the inspector parent handle,
  instead just get it from the handle.
- Rename `Worker::profiler_idle_notifier_started_` to
  `Worker::start_profiler_idle_notifier_` because it stores
  the state inherited from the parent env to use for initializing
  itself.

PR-URL: #27539
Reviewed-By: Anna Henningsen <anna@addaleax.net>

BridgeAR pushed a commit that referenced this pull request

Jun 17, 2019
Split `RunBootstrapping()` into `BootstrapInternalLoaders()`
and `BootstrapNode()` from so the two can be snapshotted
incrementally.

PR-URL: #27539
Reviewed-By: Anna Henningsen <anna@addaleax.net>