Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
build: for debug mode set v8_optimized_debug#23704
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
Conversation
refack commented Oct 16, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Oct 16, 2018
refack commented Oct 16, 2018
/CC @nodejs/v8 @nodejs/v8-update @nodejs/build-files |
addaleax commented Oct 17, 2018
So, to make sure:
I can’t really say anything about the second commit either way (and there’s no description about what is being fixed…) |
refack commented Oct 17, 2018
|
refack commented Oct 17, 2018
BTW this cuts down the debug CI run from ~1:20h to 50m |
refack commented Oct 17, 2018
refack commented Oct 17, 2018
@addaleax Here is the diff https://www.diffchecker.com/Q340bUuJ
Line 2169 in cf3f8dd
Lines 2860 to 2881 in cf3f8dd
Lines 2972 to 2979 in cf3f8dd
Line 2603 in cf3f8dd
Line 2683 in cf3f8dd
Line 9327 in cf3f8dd
Line 11703 in cf3f8dd
Line 11754 in cf3f8dd
Line 15638 in cf3f8dd
node/deps/v8/src/source-position-table.cc Line 114 in cf3f8dd
node/deps/v8/src/source-position-table.cc Line 150 in cf3f8dd
node/deps/v8/src/source-position-table.cc Line 164 in cf3f8dd
node/deps/v8/src/source-position-table.cc Line 181 in cf3f8dd
|
addaleax commented Oct 17, 2018
I’m not sure how I feel about |
refack commented Oct 17, 2018
the gypfiles are under our responsibility, so defining it is no problem, but I my default is to trust the V8 team's preferences. Maybe someone from @nodejs/v8 can give perspective on the importance of |
hashseed commented Oct 18, 2018
|
refack commented Oct 18, 2018
As they say, that's an excellent point (flips to next slide) |
joyeecheung left a comment
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.
I assume we can still use https://ci.nodejs.org/job/node-test-commit-custom-suites/ (with CONFIG_FLAGS=--non-optimized-debug) to try the slow checks in the CI after this?
deps/v8/gypfiles/toolchain.gypi Outdated
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.
If I am reading this correctly, this switches the configuration-based conditional to a variable-based conditional (v8_optimized_debug) to fix the bug? Can you paste the PR message into the commit message of the second commit, since it is a bit difficult to tell what the diff is doing due to all the indentations?
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.
the tl;dr if I flattened the inheritance structure. form:
node/deps/v8/gypfiles/toolchain.gypi
Lines 1315 to 1325 in 9800fd7
| }, # DebugBaseCommon | |
| 'Debug':{ | |
| 'inherit_from': ['DebugBaseCommon'], | |
| 'conditions': [ | |
| ['v8_optimized_debug==0',{ | |
| 'inherit_from': ['DebugBase0'], | |
| },{ | |
| 'inherit_from': ['DebugBase1'], | |
| }], | |
| ], | |
| }, # Debug |
to
https://github.com/nodejs/node/blob/693c7bbe621f4ab8686397e301e1f8027e734dff/deps/v8/gypfiles/toolchain.gypi#L1136-L1137
...
https://github.com/nodejs/node/blob/693c7bbe621f4ab8686397e301e1f8027e734dff/deps/v8/gypfiles/toolchain.gypi#L1200
I'll document that
refack commented Oct 19, 2018
https://ci.nodejs.org/job/node-test-commit-custom-suites/727/default/ Verified ✔️ |
addaleax commented Oct 20, 2018
refack commented Oct 20, 2018
My goal is to get |
693c7bb to 803fce2Comparerefack commented Oct 31, 2018
CI: https://ci.nodejs.org/job/node-test-pull-request/18250/ |
joyeecheung left a comment • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
LGTM modulo a more detailed commit message in the first commit
ryzokuken left a comment
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.
LGTM given that we can still enable slow DCHECKs whenever required.
Thanks, especially for all the work on the gypfiles, @refack.
803fce2 to b4c6b16Comparerefack commented Oct 31, 2018
CI: https://ci.nodejs.org/job/node-test-pull-request/18261/
@joyeecheung this is what I came up with: |
Under the assumption that debugging is more often focused on node core source. This setting compiles V8 with only partial optimizations, DCHECKS, and debug symbols, so it is still very much debuggable, but it is much faster. It does disable SLOW_DCHECKS, but at the advice of the V8 team, those are more important for deep V8 debugging. Override is configurable with `./configure --v8-non-optimized-debug`. PR-URL: #23704 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
PR-URL: #23704 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
Under the assumption that debugging is more often focused on node core source. This setting compiles V8 with only partial optimizations, DCHECKS, and debug symbols, so it is still very much debuggable, but it is much faster. It does disable SLOW_DCHECKS, but at the advice of the V8 team, those are more important for deep V8 debugging. Override is configurable with `./configure --v8-non-optimized-debug`. PR-URL: #23704 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
PR-URL: #23704 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
MylesBorins commented Nov 27, 2018
I've opted to land on 10.x but not on 8.x, it landed with minimal changes Feel free to open a backport if you like |
Under the assumption that debugging is more often focused on node core source. This setting compiles V8 with only partial optimizations, DCHECKS, and debug symbols, so it is still very much debuggable, but it is much faster. It does disable SLOW_DCHECKS, but at the advice of the V8 team, those are more important for deep V8 debugging. Override is configurable with `./configure --v8-non-optimized-debug`. PR-URL: #23704 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
PR-URL: #23704 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
Under the assumption that debugging is more often focused on node core source. This setting compiles V8 with only partial optimizations, DCHECKS, and debug symbols, so it is still very much debuggable, but it is much faster. It does disable SLOW_DCHECKS, but at the advice of the V8 team, those are more important for deep V8 debugging. Override is configurable with `./configure --v8-non-optimized-debug`. PR-URL: #23704 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
PR-URL: #23704 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
MylesBorins commented Dec 3, 2018
These changes unfortunately break the build on v10.x for windows. Below is an example of the error. Would someone be willing to manually backport? |
This cuts down the debug CI run from ~1:20h to 50m
Second commit is a bugfix in the V8 gypfiles. Since
common.gypialready definestarget_defaults, the previous setup ingypfiles/toolchain.gypi(with setting inheritance) simply didn't work. A partial comparison of the results of the two state of this flag are available at https://www.diffchecker.com/Q340bUuJUnder the assumption that debugging is more often focused on node core source.
This setting still compiles V8 with partial optimizations and with debug symbols, so it is still very much debuggable, but it is much faster.
Override is configurable by
./configure --v8-non-optimized-debugChecklist
make -j4 test(UNIX), orvcbuild test(Windows) passes