-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
deps: backport e093a04, 09db540 from upstream V8 #6398
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
Original commit messages: v8/v8@e093a04 Rehash and clear deleted entries in weak collections during GC Otherwise, they'll just keep growing until we run out of memory or hit the FixedArray's maximum capacity. BUG=v8:4909 R=hpayer@chromium.org LOG=n Review URL: https://codereview.chromium.org/1877233005 Cr-Commit-Position: refs/heads/master@{nodejs#35514} v8/v8@09db540 Reland of Rehash and clear deleted entries in weak collections during GC BUG=v8:4909 R=hpayer@chromium.org,ulan@chromium.org LOG=n Review URL: https://codereview.chromium.org/1890123002 Cr-Commit-Position: refs/heads/master@{nodejs#35538} V8-Bug: https://crbug.com/v8/4909 Fixes: nodejs#6180
Rubber-stamp LGTM |
@@ -2422,6 +2422,13 @@ void MarkCompactCollector::ClearWeakCollections() { | |||
table->RemoveEntry(i); | |||
} | |||
} | |||
// Rehash if more than 25% of the entries are deleted entries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More than 50%, I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, it's 1/3, but in any case the comment is wrong
LGTM |
Does this solve the testcase at #6375 (comment)? |
Should this go into v6? |
@jasnell I think that's the reason for backporting, isn't it? |
This can go in a patch level, no need to hold the release for this.
|
Ok. LGTM btw |
if ((table->NumberOfDeletedElements() << kJSWeakCollectionLoadFactorExp) > | ||
table->NumberOfElements()) { | ||
HandleScope scope(heap()->isolate()); | ||
table->Rehash(heap()->isolate()->factory()->undefined_value()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ofrobots this is the wrong CL, you should only merge the "Reland" CL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeisinger: Applying the two patches from the 'Reland CL' (https://codereview.chromium.org/1890123002/#ps20001) produces the same patch as 3e8d7a7. Maybe I am missing something?
/cc @matthewloring re: #7883
Btw, @jeisinger, @natorion, what about back-porting this to v8 5.0.x? |
Could you please use the process outlined in https://github.com/v8/v8/wiki/Merging%20&%20Patching ? |
Superceded by #6572. I will open a separate PR to backport the relevant commits to v4.x. |
Upon verification, the upstream fixes are not sufficient for solving the original issue in #6180. Closing this PR. Let's wait until https://crbug.com/v8/4909 gets fully resolved. |
Original commit messages: v8/v8@09db540 Reland of Rehash and clear deleted entries in weak collections during GC BUG=v8:4909 R=hpayer@chromium.org,ulan@chromium.org LOG=n Review URL: https://codereview.chromium.org/1890123002 Cr-Commit-Position: refs/heads/master@{nodejs#35538} v8/v8@686558d Fix comment about when we rehash ObjectHashTables before growing them R=ulan@chromium.org BUG= Review-Url: https://codereview.chromium.org/1918403003 Cr-Commit-Position: refs/heads/master@{nodejs#35853} Refs: https://crbug.com/v8/4909 Refs: nodejs#6180 Refs: nodejs#7689 Refs: nodejs#6398 Fixes: nodejs#14228
Original commit messages: v8/v8@09db540 Reland of Rehash and clear deleted entries in weak collections during GC BUG=v8:4909 R=hpayer@chromium.org,ulan@chromium.org LOG=n Review URL: https://codereview.chromium.org/1890123002 Cr-Commit-Position: refs/heads/master@{#35538} v8/v8@686558d Fix comment about when we rehash ObjectHashTables before growing them R=ulan@chromium.org BUG= Review-Url: https://codereview.chromium.org/1918403003 Cr-Commit-Position: refs/heads/master@{#35853} Refs: https://crbug.com/v8/4909 Refs: #6180 Refs: #7689 Refs: #6398 Fixes: #14228 PR-URL: #14829 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Original commit messages: v8/v8@09db540 Reland of Rehash and clear deleted entries in weak collections during GC BUG=v8:4909 R=hpayer@chromium.org,ulan@chromium.org LOG=n Review URL: https://codereview.chromium.org/1890123002 Cr-Commit-Position: refs/heads/master@{#35538} v8/v8@686558d Fix comment about when we rehash ObjectHashTables before growing them R=ulan@chromium.org BUG= Review-Url: https://codereview.chromium.org/1918403003 Cr-Commit-Position: refs/heads/master@{#35853} Refs: https://crbug.com/v8/4909 Refs: #6180 Refs: #7689 Refs: #6398 Fixes: #14228 PR-URL: #14829 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Original commit messages: v8/v8@09db540 Reland of Rehash and clear deleted entries in weak collections during GC BUG=v8:4909 R=hpayer@chromium.org,ulan@chromium.org LOG=n Review URL: https://codereview.chromium.org/1890123002 Cr-Commit-Position: refs/heads/master@{#35538} v8/v8@686558d Fix comment about when we rehash ObjectHashTables before growing them R=ulan@chromium.org BUG= Review-Url: https://codereview.chromium.org/1918403003 Cr-Commit-Position: refs/heads/master@{#35853} Refs: https://crbug.com/v8/4909 Refs: nodejs/node#6180 Refs: nodejs/node#7689 Refs: nodejs/node#6398 Fixes: nodejs/node#14228 PR-URL: nodejs/node#14829 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Checklist
Affected core subsystem(s)
deps
Description of change
Original commit messages:
v8/v8@e093a04
v8/v8@09db540
V8-Bug: https://crbug.com/v8/4909
Fixes: #6180
Ref: #6375
R=@nodejs/v8
CI: https://ci.nodejs.org/job/node-test-pull-request/2399/