Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Issue 1884023002: Implement Dump-on-DCHECK (via alternate DCHECK and DCHECK_OP macro implementations). (Closed)

Created:
4 years, 8 months ago by Wez
Modified:
3 years, 6 months ago
CC:
chromium-reviews, blink-reviews, blink-reviews-wtf_chromium.org, Mikhail, laforge, dcheng, gab, Primiano Tucci (use gerrit)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement Dump-on-DCHECK (via alternate DCHECK and DCHECK_OP macro implementations). This patch adds new DCHECK and DCHECK_OP macro implementations which upload a dump without actually crashing, and only do so on the first DUMP-severity failure. A new DCHECK_IS_DUMP_WITHOUT_CRASHING macro is introduced, to enable the new behaviour in DCHECK_IS_ON()[1] builds. A new build argument, dump_on_first_dcheck, is set in the GN configuration to enable the DCHECK_IS_DUMP_WITHOUT_CRASHING macro. All non-DCHECK_IS_ON() behaviours, e.g. CHECK, PCHECK, SECURITY_CHECK, are unchanged and continue to be mapped to the LOG_FATAL severity. Dump-on-DCHECK will be enabled in one-off Canary builds by temporarily landing this patch, and reverting it as soon as the Canary build has been cut. BUG=596231 [1] DCHECK_IS_ON() is set in Debug builds, and Release builds with DCHECK_ALWAYS_ON.

Patch Set 1 #

Total comments: 2

Patch Set 2 : Original dump-on-DCHECK #

Patch Set 3 : Tweak DCHECK_OP to match CHECK_OP implementation #

Patch Set 4 : Reference operator<<(val1/val2) to avoid unused-function errors. #

Patch Set 5 : Enable for non-official, to allow tries #

Patch Set 6 : Use dump_on_first_dcheck and enable for all platforms for try coverage #

Patch Set 7 : Use Check#name#Impl() for DCHECK_OP after all #

Patch Set 8 : Enable WTF ASSERTS, and fix DumpWithoutCrashing() call-site #

Patch Set 9 : Update for dependent patches #

Patch Set 10 : Fix DCHECK_AT for dump-on-DCHECK #

Patch Set 11 : Reinstate LOG_DCHECK #

Patch Set 12 : Pull the Official Windows build default in, and rebase #

Patch Set 13 : Fix NDEBUG conditionals, use DFATAL #

Patch Set 14 : Fix DCHECK_AT #

Patch Set 15 : Move cleanups to separate CL #

Patch Set 16 : Rebase on cleanups #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -7 lines) Patch
M base/logging.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +34 lines, -1 line 0 comments Download
M base/logging.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +16 lines, -0 lines 0 comments Download
M base/logging_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +30 lines, -1 line 0 comments Download
M base/test/gtest_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M build/config/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -0 lines 0 comments Download
M build/config/dcheck_always_on.gni View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/Assertions.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +10 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/wtf/AssertionsTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 101 (80 generated)
Nico
is this different from the other one? if so, can you upload the original as ...
4 years, 8 months ago (2016-04-14 02:22:34 UTC) #3
danakj
On Wed, Apr 13, 2016 at 7:22 PM, <thakis@chromium.org> wrote: > is this different from ...
4 years, 8 months ago (2016-04-14 18:35:28 UTC) #4
danakj
On Wed, Apr 13, 2016 at 7:22 PM, <thakis@chromium.org> wrote: > is this different from ...
4 years, 8 months ago (2016-04-14 18:35:29 UTC) #5
ncarter (slow)
lgtm https://codereview.chromium.org/1884023002/diff/1/base/logging.h File base/logging.h (right): https://codereview.chromium.org/1884023002/diff/1/base/logging.h#newcode717 base/logging.h:717: DCHECK((val1) op (val2)) This looks correct.
4 years, 8 months ago (2016-04-14 18:41:35 UTC) #7
scottmg
I did a quick test on an official build of base_unittests and DCHECK_EQ seems to ...
4 years, 8 months ago (2016-04-14 19:40:07 UTC) #8
Wez
This is what happens if you start reviewing before I've hit Publish+Mail Comments. ;) Have ...
4 years, 8 months ago (2016-04-14 19:54:39 UTC) #9
Wez
To work-around the operator<<() I've added logging of the values in the DCHECK, so that ...
4 years, 8 months ago (2016-04-15 00:19:43 UTC) #10
scottmg
On 2016/04/15 00:19:43, Wez wrote: > To work-around the operator<<() I've added logging of the ...
4 years, 8 months ago (2016-04-15 16:32:09 UTC) #11
Wez
Thanks for checking, Scott. I'm adding logging of the values, so I suppose it's possible ...
4 years, 8 months ago (2016-04-15 23:46:19 UTC) #12
Wez
Thanks for checking, Scott. I'm adding logging of the values, so I suppose it's possible ...
4 years, 8 months ago (2016-04-15 23:46:19 UTC) #13
Wez
P.S. The try-bot failures are due to tautologous DCHECK_OPs in the QUIC code, which I've ...
4 years, 8 months ago (2016-04-15 23:47:11 UTC) #14
scottmg
On 2016/04/15 23:47:11, Wez wrote: > P.S. The try-bot failures are due to tautologous DCHECK_OPs ...
4 years, 8 months ago (2016-04-15 23:50:25 UTC) #15
scottmg
On 2016/04/15 23:46:19, Wez wrote: > Thanks for checking, Scott. I'm adding logging of the ...
4 years, 8 months ago (2016-04-15 23:52:35 UTC) #16
Wez
On 2016/04/15 23:50:25, scottmg wrote: > On 2016/04/15 23:47:11, Wez wrote: > > P.S. The ...
4 years, 8 months ago (2016-04-15 23:57:27 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1884023002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1884023002/100001
4 years, 7 months ago (2016-05-24 22:22:27 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/195638) win_chromium_x64_rel_ng on ...
4 years, 7 months ago (2016-05-24 23:16:56 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1884023002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1884023002/100001
4 years, 7 months ago (2016-05-26 20:29:24 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_clang on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/28499)
4 years, 7 months ago (2016-05-26 21:38:24 UTC) #25
Wez
thakis: This is the alternative dump-on-DCHECK implementation to https://codereview.chromium.org/2288473002/, avoiding the need for a new ...
3 years, 11 months ago (2017-01-20 23:46:55 UTC) #58
Wez
thakis: PTAL
3 years, 11 months ago (2017-01-25 02:16:06 UTC) #59
Wez
3 years, 10 months ago (2017-02-23 06:33:20 UTC) #99
Folks, I've moved out dependent changes to a separate CL, so this should be the
minimal CL we need to land & revert to run the dump-on-DCHECK experiment.

thakis: PTAL & let me know if this looks OK to you - thanks.

Powered by Google App Engine
This is Rietveld 408576698