-
Notifications
You must be signed in to change notification settings - Fork 30k
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
build: for debug mode set v8_optimized_debug
#23704
Conversation
/CC @nodejs/v8 @nodejs/v8-update @nodejs/build-files |
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…) |
|
BTW this cuts down the debug CI run from ~1:20h to 50m |
@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
|
I’m not sure how I feel about |
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 |
|
As they say, that's an excellent point (flips to next slide) |
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?
@@ -1134,121 +1134,7 @@ | |||
}], | |||
], # conditions | |||
'configurations': { | |||
# Abstract configuration for v8_optimized_debug == 0. |
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
https://ci.nodejs.org/job/node-test-commit-custom-suites/727/default/
Verified ✔️ |
My goal is to get |
693c7bb
to
803fce2
Compare
CI: https://ci.nodejs.org/job/node-test-pull-request/18250/ |
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
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 DCHECK
s whenever required.
Thanks, especially for all the work on the gypfiles, @refack.
803fce2
to
b4c6b16
Compare
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 <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
PR-URL: #23704 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
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 <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
PR-URL: #23704 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
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 <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
PR-URL: #23704 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
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 <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
PR-URL: #23704 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
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.gypi
already 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-debug
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes