-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
v8: backport bb357524 to v8.x-staging (a8f68691 from upstream v8) #22714
v8: backport bb357524 to v8.x-staging (a8f68691 from upstream v8) #22714
Conversation
Patch level in |
@richardlau Thanks for the reminder about the patch level. Mind kicking off a test run for this? |
@benjamn Looks like there's an issue with
|
e951480
to
2a957fb
Compare
Ok, I've backported a small change from upstream V8 (6.7.176) that should fix that compilation error. |
I'm having trouble accessing the CI at the moment (gateway timeouts) so I haven't been able to start a new CI run. May not be around much this weekend, but maybe another collaborator can start one when the CI is more responsive. |
2a957fb
to
9d6f70c
Compare
Fixed a couple more trivial compilation errors in |
Another V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/1680/ |
(This will obviously need a clean Node CI run too, but lets get a green V8 CI first). |
@richardlau Thanks for your patience! |
V8 CI looking green! 😌 |
Can we do a Node CI run? I'm assuming that will auto-rebase, but I'm happy to rebase these changes if that's not the case. |
@richardlau Just resurfacing this since it's been a minute. Thanks for your help so far. |
This seems ready to land—do we need any more approvals? |
@benjamn I'd like sign off from someone from the @nodejs/v8-update team... Generally we do not float changes onto V8 that do not exist upstream in some capacity. This PR is made up of 5 different commits, not all of which appear to have upstream equivalence. FWIW it is fine for a change to require modification to work when backported, but generally those changes are squashed into the original commit. What I would like to see before this lands would be the following
|
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.
Please do not land this until the request I've made above are responded to
First let me explain why the additional commits should be uncontroversial, and then I'll explain the difference between the main commit and its upstream equivalent. If you look at the commit message for ad3b8e76c6e47204535b5504738c12e6348a3c60, it explains that the change comes from a commit first included in V8 6.7.176: v8/v8@cc9736a. When this code is updated to V8 6.7.176 or later, there will be no merge conflicts. I didn't want to backport anything else from that commit, because the Commit a0e5d6f66e0069a729b210cb8d80f5702e990df5 is a V8 cctest-only commit to add a parameter to the Commit df50aab3d6add07b719944e6a794a31b13c1b87c might as well be squashed into a0e5d6f66e0069a729b210cb8d80f5702e990df5, as I forgot the Commit 9d6f70c3771677f5c20ff5bb03380a3c5a810ccb bumps the |
The second commit (ad3b8e76c6e47204535b5504738c12e6348a3c60) is a subset of an upstream commit (v8/v8@cc9736a). Can the entire patch be back-ported? (an additional patch version bump should be included in this commit) The third and forth (a0e5d6f66e0069a729b210cb8d80f5702e990df5, df50aab3d6add07b719944e6a794a31b13c1b87c) could probably be squashed. I am not sure of their pedigree. If the responsible commit upstream is back-portable, we should at least document what commit the patch ends up being a subset of. The fifth commit should be squashed into the first as @MylesBorins pointed out. EDIT: @benjamn I didn't see your comment before this comment. |
(Thanks @ofrobots!) That leaves commit 9faf12f2b18b8a63ec0827d8cdf9011712b453ed, which is identical (outside of test code) to the version of this PR that landed on As for why we avoid creating a new Hope that helps! Happy to make any squashing/reformatting changes you like, though I would love direct guidance about that. |
One more note: the two test-only commits (a0e5d6f66e0069a729b210cb8d80f5702e990df5 and df50aab3d6add07b719944e6a794a31b13c1b87c) are confined to the very code that I added in v8/v8@a8f6869, so that's their pedigree. The changes were necessary to make the test I added compile in Node 8 and Node 10. In other words, the only upstream commit that could correspond to those two changes is the commit that I'm already backporting in this PR! |
9d6f70c
to
59b5332
Compare
59b5332
to
1134dca
Compare
@MylesBorins (&al.) I've squashed everything down to two commits. The non-test parts of the main commit (c204389777622fc00050d3ddad07c543f4180662) are identical to what already landed on I've left 1134dcaefc83d931d66098cd74d5f6b21db34429 as a separate commit because it corresponds to a different upstream commit (v8/v8@cc9736a). I don't know how to evaluate whether the other changes in that commit are worth cherry-picking, but I'm confident the |
@benjamn I think we can just squash 1134dca into c204389 if we don't plan to backport the entire V8 change. The change by itself looks unlikely to break anything, but I see no advantage to keeping it separate, in fact it will only make an instance of the tree with a broken test (bad for bisecting). Assuming the below CI is green and nobody from @nodejs/v8-update objects, I'll go ahead and land this as a single commit. CI: https://ci.nodejs.org/job/node-test-pull-request/17702/ |
Totally agree with the point about bisection! I'll squash everything in a moment. I suspect those test failures are unrelated. Windows:
and Ubuntu:
|
1134dca
to
bca38e1
Compare
I think this is ready to go, pending @nodejs/v8-update approval and possibly another test run, since I rebased and squashed everything after the last CI run. |
The upstream V8 commit a8f68691 was originally cherry-picked onto nodejs/node master as commit bb35752, then backported to v10.x-staging and released in Node.js v10.10.0 as 5e9ed6d. This commit cherry-picks that commit back to the v8.x-staging branch. Refs: v8/v8@a8f6869 Refs: nodejs#22122 Refs: nodejs@bb35752 Refs: nodejs@5e9ed6d Original commit message: [debug] Fully implement Debug::ArchiveDebug and Debug::RestoreDebug. I have a project that embeds V8 and uses a single `Isolate` from multiple threads. The program runs just fine, but sometimes the inspector doesn't stop on the correct line after stepping over a statement that switches threads behind the scenes, even though the original thread is restored by the time the next statement is executed. After some digging, I discovered that the `Debug::ArchiveDebug` and `Debug::RestoreDebug` methods, which should be responsible for saving/restoring this `ThreadLocal` information when switching threads, currently don't do anything. This commit implements those methods using MemCopy, in the style of other Archive/Restore methods in the V8 codebase. Related: https://groups.google.com/forum/#!topic/v8-users/_Qf2rwljRk8 R=yangguo@chromium.org,jgruber@chromium.org CC=info@bnoordhuis.nl Bug: v8:7230 Change-Id: Id517c873eb81cd53f7216c7efd441b956cf7f943 Reviewed-on: https://chromium-review.googlesource.com/833260 Commit-Queue: Yang Guo <yangguo@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{nodejs#54902} PR-URL: nodejs#22714 ADDITIONAL CHANGES: Support optional boolean argument to DisableBreak constructor. This allows a stack-allocated DisableBreak object to re-enable breakpoints temporarily, rather than always disabling them. This functionality anticipates an upstream change that will be introduced in V8 6.7.176: v8/v8@cc9736a More immediately, these changes should fix a cctest compile error in this backport PR: nodejs#22714 (comment)
bca38e1
to
d9f4465
Compare
@MylesBorins I just rebased and bumped |
One more CI: https://ci.nodejs.org/job/node-test-pull-request/18084/ I pinged the V8 team in their chat to get someone to review |
Rebuilding failed linux tests: https://ci.nodejs.org/job/node-test-commit-linux-containered/8201/ edit: one more time https://ci.nodejs.org/job/node-test-commit-linux-containered/8223/ |
landed in ce65d84 Thanks for sticking around! |
The upstream V8 commit a8f68691 was originally cherry-picked onto nodejs/node master as commit bb35752, then backported to v10.x-staging and released in Node.js v10.10.0 as 5e9ed6d. This commit cherry-picks that commit back to the v8.x-staging branch. Additionally this commit supports optional boolean argument to DisableBreak constructor. This allows a stack-allocated DisableBreak object to re-enable breakpoints temporarily, rather than always disabling them. This functionality anticipates an upstream change that will be introduced in V8 6.7.176: v8/v8@cc9736a Original commit message: [debug] Fully implement Debug::ArchiveDebug and Debug::RestoreDebug. I have a project that embeds V8 and uses a single `Isolate` from multiple threads. The program runs just fine, but sometimes the inspector doesn't stop on the correct line after stepping over a statement that switches threads behind the scenes, even though the original thread is restored by the time the next statement is executed. After some digging, I discovered that the `Debug::ArchiveDebug` and `Debug::RestoreDebug` methods, which should be responsible for saving/restoring this `ThreadLocal` information when switching threads, currently don't do anything. This commit implements those methods using MemCopy, in the style of other Archive/Restore methods in the V8 codebase. Related: https://groups.google.com/forum/#!topic/v8-users/_Qf2rwljRk8 R=yangguo@chromium.org,jgruber@chromium.org CC=info@bnoordhuis.nl Bug: v8:7230 Change-Id: Id517c873eb81cd53f7216c7efd441b956cf7f943 Reviewed-on: https://chromium-review.googlesource.com/833260 Commit-Queue: Yang Guo <yangguo@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#54902} PR-URL: #22714 Refs: v8/v8@a8f6869 Refs: #22122 Refs: bb35752 Refs: 5e9ed6d Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org>
Release blog post: https://nodejs.org/en/blog/release/v8.13.0/ This release includes my PR to improve multi-threaded debugging, which should finally fix #9275: nodejs/node#22714
The upstream V8 commit v8/v8@a8f6869 was originally cherry-picked onto
master
as commit bb35752, then backported tov10.x-staging
and released in Node.js v10.10.0 as 5e9ed6d. This commit cherry-picks that commit back to thev8.x-staging
branch.Refs: v8/v8@a8f6869
Refs: #22122
Refs: bb35752
Refs: 5e9ed6d
Original commit message:
PR-URL: #22714