Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ext/node): fix vm memory usage and context initialization #23976

Merged
merged 21 commits into from
Jun 12, 2024

Conversation

littledivy
Copy link
Member

@littledivy littledivy commented May 24, 2024

Fixes #22441
Fixes #23913
Fixes #23852
Fixes #23917

@littledivy littledivy marked this pull request as draft May 24, 2024 14:49
littledivy added a commit to denoland/deno_core that referenced this pull request Jun 7, 2024
Remove usage of rusty_v8 annex slots for storing `ContextState` and
`ModuleMap` and instead store them directly in a dedicated embedder
field.

Needed for denoland/deno#23976
@littledivy littledivy marked this pull request as ready for review June 12, 2024 03:42
@littledivy

This comment was marked as resolved.

@littledivy littledivy changed the title perf(node): reuse vm snapshot context fix(ext/node): fix vm memory usage and context initialization Jun 12, 2024
Comment on lines +691 to +700
// Uncomment for remote debugging
// {
// name: "Setup tmate session",
// if: [
// "(matrix.job == 'test' || matrix.job == 'bench') &&",
// "matrix.profile == 'release' && (matrix.use_sysroot ||",
// "github.repository == 'denoland/deno')",
// ].join("\n"),
// uses: "mxschmitt/action-tmate@v3",
// },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this left on purpose?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, ive used it quite a few times for segfaults in CIs

ext/node/ops/vm.rs Outdated Show resolved Hide resolved
let mut external_references = Vec::with_capacity(7);
let mut external_references = Vec::with_capacity(14);

vm::GETTER_MAP_FN.with(|getter| {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should try to remove this thread local hack - maybe the problem is now gone

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But not in this PR

ext/node/ops/vm_internal.rs Outdated Show resolved Hide resolved
ext/node/ops/vm_internal.rs Outdated Show resolved Hide resolved
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@littledivy littledivy merged commit 1d290cc into denoland:main Jun 12, 2024
17 checks passed
@littledivy littledivy deleted the vm_snapshot_context branch June 12, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants