Closed
Bug 1331414
Opened 8 years ago
Closed 8 years ago
Make it possible to disable some debug checks
Categories
(Core :: JavaScript Engine: JIT, defect, P3)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla54
| Tracking | Status | |
|---|---|---|
| firefox54 | --- | fixed |
People
(Reporter: h4writer, Assigned: h4writer)
Details
Attachments
(1 file)
|
13.68 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
One of the issues of running debug builds is the speed. The jit engine is doing a lot of tests (AssertBasicXXX and emitDebugResultChecks) which decrease the speed of JS code enormously. As a result we cannot encourage somebody to run a debug build when encountering an issue. Or run it ourself to generate more data.
In this bug I want to add a check that disables most of the slow checks dynamically in about:config. That should make it possible for us to run debug builds again for testing.
The patch I will attach adds in about:config
javascript.options.jit.fullDebugChecks
By setting that to false we will only run the AssertBasicGraph at the end. Not after every pass. And we will not execute emitDebugResultChecks.
| Assignee | ||
Comment 1•8 years ago
|
||
Assignee: nobody → hv1989
Attachment #8827208 -
Flags: review?(jdemooij)
| Assignee | ||
Updated•8 years ago
|
Priority: -- → P3
Comment 2•8 years ago
|
||
Comment on attachment 8827208 [details] [diff] [review]
Patch
Review of attachment 8827208 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for adding this. After we land this, it would be really interesting to compare 2 Try pushes (with this option enabled vs disabled), to see if it speeds up test runs (jit-tests, jsreftests, mochitests in particular). I would also be happy to do that.
::: js/src/jit/IonAnalysis.cpp
@@ +2699,3 @@
> {
> #ifdef DEBUG
> + if (!JitOptions.fullDebugChecks && !force)
We should also add this check to the #ifdef DEBUG integrity.record() and integrity.check() calls in Ion.cpp, as that also does a lot of extra work in debug builds.
There's similar code for RegisterAllocator_Stupid that we can't disable (it's used even in opt builds), but it doesn't matter as we don't use that allocator.
::: modules/libpref/init/all.js
@@ +1251,5 @@
> #endif
> pref("javascript.options.throw_on_asmjs_validation_failure", false);
> pref("javascript.options.ion.offthread_compilation", true);
> +#ifdef DEBUG
> +pref("javascript.options.jit.fullDebugChecks", true);
s/fullDebugChecks/full_debug_checks/ to match the other file.
Attachment #8827208 -
Flags: review?(jdemooij) → review+
Pushed by hv1989@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dbf9a55f1101
Adding javascript.options.jit.full_debug_checks in about:config for people that want to use debug builds for surfing with less slowdown, r=jandem
| Assignee | ||
Comment 4•8 years ago
|
||
When setting this jit-tests improved from 330s to 300s locally
Comment 5•8 years ago
|
||
Backed out for unused variable 'fullJitDebugChecks' at XPCJSContext.cpp:1452:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f3de7f37c56ee9dd96af01a97099551f13e1dc82
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=dbf9a55f110102ab503c387d2d7009b36a26b052
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=73681431&repo=mozilla-inbound
[task 2017-02-01T21:17:35.984804Z] 21:17:35 INFO - In file included from /home/worker/workspace/build/src/obj-firefox/js/xpconnect/src/Unified_cpp_js_xpconnect_src0.cpp:56:0:
[task 2017-02-01T21:17:35.984907Z] 21:17:35 INFO - /home/worker/workspace/build/src/js/xpconnect/src/XPCJSContext.cpp: In function 'void ReloadPrefsCallback(const char*, void*)':
[task 2017-02-01T21:17:35.984994Z] 21:17:35 INFO - /home/worker/workspace/build/src/js/xpconnect/src/XPCJSContext.cpp:1452:10: error: unused variable 'fullJitDebugChecks' [-Werror=unused-variable]
[task 2017-02-01T21:17:35.985061Z] 21:17:35 INFO - bool fullJitDebugChecks = Preferences::GetBool(JS_OPTIONS_DOT_STR "jit.full_debug_checks");
[task 2017-02-01T21:17:35.985095Z] 21:17:35 INFO - ^
[task 2017-02-01T21:17:35.985136Z] 21:17:35 INFO - cc1plus: all warnings being treated as errors
[task 2017-02-01T21:17:35.985201Z] 21:17:35 INFO - /home/worker/workspace/build/src/config/rules.mk:1012: recipe for target 'Unified_cpp_js_xpconnect_src0.o' failed
[task 2017-02-01T21:17:35.985251Z] 21:17:35 INFO - gmake[5]: *** [Unified_cpp_js_xpconnect_src0.o] Error 1
Flags: needinfo?(hv1989)
Pushed by hv1989@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3d5e5df1bce2
Adding javascript.options.jit.full_debug_checks in about:config for people that want to use debug builds for surfing with less slowdown, r=jandem
Comment 7•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
| Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(hv1989)
| Assignee | ||
Comment 8•8 years ago
|
||
I have been running this happily for two days. Debug builds now don't suck that much anymore! (With these checks disabled).
You need to log in
before you can comment on or make changes to this bug.
Description
•