0
Commit Graph

7 Commits

Author SHA1 Message Date
Findit
c025a5e3ee Revert "Include base/immediate_crash.h in base/check.h conditionally."
This reverts commit ac9e9ebd9b.

Reason for revert:
Findit (https://goo.gl/kROfz5) identified this CL at revision ac9e9ebd9b as
the culprit for failures in the continuous build including:

Sample Failed Build: https://ci.chromium.org/b/8825004509580194353
Sample Failed Step: compile

If it is a false positive, please report it at https://bugs.chromium.org/p/chromium/issues/entry?status=Available&comment=Datastore+key+for+the+culprit+entity%3A+chromium.googlesource.com%2Fchromium%2Fsrc%2Frefs%2Fheads%2Fmain%2Fac9e9ebd9b5f9364241f10218bfe9a35be099481&labels=Test-Findit-Wrong&components=Tools%3ETest%3EFindIt&summary=Wrongly+blame+ac9e9ebd9b5f9364241f10218bfe9a35be099481

Original change's description:
> Include base/immediate_crash.h in base/check.h conditionally.
> 
> Only include it in official builds, where it is needed. Then do IWYU to
> fix the build.
> 
> Change-Id: I4988f60690dd3100ad5ca5320bba1006f580fa58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3373870
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Lei Zhang <thestig@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#959518}


Change-Id: I5bd868367ca2fdfa149a522303b6877d0ee22541
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3391102
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#959522}
2022-01-15 03:51:25 +00:00
Lei Zhang
ac9e9ebd9b Include base/immediate_crash.h in base/check.h conditionally.
Only include it in official builds, where it is needed. Then do IWYU to
fix the build.

Change-Id: I4988f60690dd3100ad5ca5320bba1006f580fa58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3373870
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#959518}
2022-01-15 03:20:04 +00:00
Hans Wennborg
c3cffa634c Remove/replace unnecessary logging.h includes in .cc files (base)
CHECK, CHECK_EQ etc., and NOTREACHED/NOTIMPLEMENTED have moved
to the much smaller headers check.h, check_op.h, and notreached.h,
respectively.

This CL updates .cc files to use those headers instead when
possible, with the purpose of saving compile time.

(Split out from https://crrev.com/c/2164525 which also has
notes on how the change was generated.)

Bug: 1031540
Change-Id: I39ecaaf0d0770f1048c7f2ce2c43f98ec9212565
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2164633
Commit-Queue: Hans Wennborg <hans@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762782}
2020-04-27 10:09:12 +00:00
scottmg
3c957a583f Improve EAT_STREAM_PARAMETERS for Windows x86
Dumps of check_example.exe

Current:

?DoBlinkReleaseAssert@@YAX_N@Z:
  00404EDC: 55                 push        ebp
  00404EDD: 8B EC              mov         ebp,esp
  00404EDF: 80 7D 08 00        cmp         byte ptr [ebp+8],0
  00404EE3: 75 07              jne         00404EEC
  00404EE5: C6 05 00 00 00 00  mov         byte ptr ds:[0],0
            00
  00404EEC: 5D                 pop         ebp
  00404EED: C3                 ret
?DoCheck@@YAX_N@Z:
  00404EEE: 55                 push        ebp
  00404EEF: 8B EC              mov         ebp,esp
  00404EF1: 51                 push        ecx
  00404EF2: 83 65 FC 00        and         dword ptr [ebp-4],0
  00404EF6: 80 7D 08 00        cmp         byte ptr [ebp+8],0
  00404EFA: 75 07              jne         00404F03
  00404EFC: C6 05 00 00 00 00  mov         byte ptr ds:[0],0
            00
  00404F03: 8B E5              mov         esp,ebp
  00404F05: 5D                 pop         ebp
  00404F06: C3                 ret
_main:
  00404F07: 55                 push        ebp
  00404F08: 8B EC              mov         ebp,esp
  00404F0A: 83 7D 08 02        cmp         dword ptr [ebp+8],2
  00404F0E: 53                 push        ebx
  00404F0F: 0F 9F C3           setg        bl
  00404F12: 53                 push        ebx
  00404F13: E8 D6 FF FF FF     call        ?DoCheck@@YAX_N@Z
  00404F18: 53                 push        ebx
  00404F19: E8 BE FF FF FF     call        ?DoBlinkReleaseAssert@@YAX_N@Z
  00404F1E: 59                 pop         ecx
  00404F1F: 59                 pop         ecx
  00404F20: 33 C0              xor         eax,eax
  00404F22: 5B                 pop         ebx
  00404F23: 5D                 pop         ebp
  00404F24: C3                 ret

After this CL:

?DoBlinkReleaseAssert@@YAX_N@Z:
  00404EAC: 55                 push        ebp
  00404EAD: 8B EC              mov         ebp,esp
  00404EAF: 80 7D 08 00        cmp         byte ptr [ebp+8],0
  00404EB3: 75 07              jne         00404EBC
  00404EB5: C6 05 00 00 00 00  mov         byte ptr ds:[0],0
            00
  00404EBC: 5D                 pop         ebp
  00404EBD: C3                 ret
_main:
  00404EBE: 55                 push        ebp
  00404EBF: 8B EC              mov         ebp,esp
  00404EC1: 83 7D 08 02        cmp         dword ptr [ebp+8],2
  00404EC5: 53                 push        ebx
  00404EC6: 0F 9F C3           setg        bl
  00404EC9: 53                 push        ebx
  00404ECA: E8 DD FF FF FF     call        ?DoBlinkReleaseAssert@@YAX_N@Z
  00404ECF: 53                 push        ebx
  00404ED0: E8 D7 FF FF FF     call        ?DoBlinkReleaseAssert@@YAX_N@Z
  00404ED5: 59                 pop         ecx
  00404ED6: 59                 pop         ecx
  00404ED7: 33 C0              xor         eax,eax
  00404ED9: 5B                 pop         ebx
  00404EDA: 5D                 pop         ebp
  00404EDB: C3                 ret

Amusingly, I was confused because I thought I was going crazy when
DoCheck wasn't showing up in the /disasm. But of course, it's because it
got COMDAT'd with the Blink one, as we want. :)

R=primiano@chromium.org
BUG=672699

Review-Url: https://codereview.chromium.org/2559323007
Review-Url: https://codereview.chromium.org/2559323007
Cr-Commit-Position: refs/heads/master@{#437777}
2016-12-10 21:00:06 +00:00
primiano
314c528dc1 Revert of Improve EAT_STREAM_PARAMETERS for Windows x86 (patchset id:240001 of https://codereview.chromium.org/2559323007/ )
Reason for revert:
Broke D*LOG on a bunch of bots building non-official builds.
See https://codereview.chromium.org/2559323007/#msg60
and https://codereview.chromium.org/2559323007/#msg61
for more context.

Original issue's description:
> Improve EAT_STREAM_PARAMETERS for Windows x86
>
> Dumps of check_example.exe
>
> Current:
>
> ?DoBlinkReleaseAssert@@YAX_N@Z:
>   00404EDC: 55                 push        ebp
>   00404EDD: 8B EC              mov         ebp,esp
>   00404EDF: 80 7D 08 00        cmp         byte ptr [ebp+8],0
>   00404EE3: 75 07              jne         00404EEC
>   00404EE5: C6 05 00 00 00 00  mov         byte ptr ds:[0],0
>             00
>   00404EEC: 5D                 pop         ebp
>   00404EED: C3                 ret
> ?DoCheck@@YAX_N@Z:
>   00404EEE: 55                 push        ebp
>   00404EEF: 8B EC              mov         ebp,esp
>   00404EF1: 51                 push        ecx
>   00404EF2: 83 65 FC 00        and         dword ptr [ebp-4],0
>   00404EF6: 80 7D 08 00        cmp         byte ptr [ebp+8],0
>   00404EFA: 75 07              jne         00404F03
>   00404EFC: C6 05 00 00 00 00  mov         byte ptr ds:[0],0
>             00
>   00404F03: 8B E5              mov         esp,ebp
>   00404F05: 5D                 pop         ebp
>   00404F06: C3                 ret
> _main:
>   00404F07: 55                 push        ebp
>   00404F08: 8B EC              mov         ebp,esp
>   00404F0A: 83 7D 08 02        cmp         dword ptr [ebp+8],2
>   00404F0E: 53                 push        ebx
>   00404F0F: 0F 9F C3           setg        bl
>   00404F12: 53                 push        ebx
>   00404F13: E8 D6 FF FF FF     call        ?DoCheck@@YAX_N@Z
>   00404F18: 53                 push        ebx
>   00404F19: E8 BE FF FF FF     call        ?DoBlinkReleaseAssert@@YAX_N@Z
>   00404F1E: 59                 pop         ecx
>   00404F1F: 59                 pop         ecx
>   00404F20: 33 C0              xor         eax,eax
>   00404F22: 5B                 pop         ebx
>   00404F23: 5D                 pop         ebp
>   00404F24: C3                 ret
>
>
>
> After this CL:
>
> ?DoBlinkReleaseAssert@@YAX_N@Z:
>   00404EAC: 55                 push        ebp
>   00404EAD: 8B EC              mov         ebp,esp
>   00404EAF: 80 7D 08 00        cmp         byte ptr [ebp+8],0
>   00404EB3: 75 07              jne         00404EBC
>   00404EB5: C6 05 00 00 00 00  mov         byte ptr ds:[0],0
>             00
>   00404EBC: 5D                 pop         ebp
>   00404EBD: C3                 ret
> _main:
>   00404EBE: 55                 push        ebp
>   00404EBF: 8B EC              mov         ebp,esp
>   00404EC1: 83 7D 08 02        cmp         dword ptr [ebp+8],2
>   00404EC5: 53                 push        ebx
>   00404EC6: 0F 9F C3           setg        bl
>   00404EC9: 53                 push        ebx
>   00404ECA: E8 DD FF FF FF     call        ?DoBlinkReleaseAssert@@YAX_N@Z
>   00404ECF: 53                 push        ebx
>   00404ED0: E8 D7 FF FF FF     call        ?DoBlinkReleaseAssert@@YAX_N@Z
>   00404ED5: 59                 pop         ecx
>   00404ED6: 59                 pop         ecx
>   00404ED7: 33 C0              xor         eax,eax
>   00404ED9: 5B                 pop         ebx
>   00404EDA: 5D                 pop         ebp
>   00404EDB: C3                 ret
>
>
> Amusingly, I was confused because I thought I was going crazy when
> DoCheck wasn't showing up in the /disasm. But of course, it's because it
> got COMDAT'd with the Blink one, as we want. :)
>
> R=primiano@chromium.org
> BUG=672699
>
> Review-Url: https://codereview.chromium.org/2559323007

TBR=dcheng@chromium.org,scottmg@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=672699

Review-Url: https://codereview.chromium.org/2569583002
Cr-Commit-Position: refs/heads/master@{#437764}
2016-12-10 10:32:34 +00:00
scottmg
39e086ae3e Improve EAT_STREAM_PARAMETERS for Windows x86
Dumps of check_example.exe

Current:

?DoBlinkReleaseAssert@@YAX_N@Z:
  00404EDC: 55                 push        ebp
  00404EDD: 8B EC              mov         ebp,esp
  00404EDF: 80 7D 08 00        cmp         byte ptr [ebp+8],0
  00404EE3: 75 07              jne         00404EEC
  00404EE5: C6 05 00 00 00 00  mov         byte ptr ds:[0],0
            00
  00404EEC: 5D                 pop         ebp
  00404EED: C3                 ret
?DoCheck@@YAX_N@Z:
  00404EEE: 55                 push        ebp
  00404EEF: 8B EC              mov         ebp,esp
  00404EF1: 51                 push        ecx
  00404EF2: 83 65 FC 00        and         dword ptr [ebp-4],0
  00404EF6: 80 7D 08 00        cmp         byte ptr [ebp+8],0
  00404EFA: 75 07              jne         00404F03
  00404EFC: C6 05 00 00 00 00  mov         byte ptr ds:[0],0
            00
  00404F03: 8B E5              mov         esp,ebp
  00404F05: 5D                 pop         ebp
  00404F06: C3                 ret
_main:
  00404F07: 55                 push        ebp
  00404F08: 8B EC              mov         ebp,esp
  00404F0A: 83 7D 08 02        cmp         dword ptr [ebp+8],2
  00404F0E: 53                 push        ebx
  00404F0F: 0F 9F C3           setg        bl
  00404F12: 53                 push        ebx
  00404F13: E8 D6 FF FF FF     call        ?DoCheck@@YAX_N@Z
  00404F18: 53                 push        ebx
  00404F19: E8 BE FF FF FF     call        ?DoBlinkReleaseAssert@@YAX_N@Z
  00404F1E: 59                 pop         ecx
  00404F1F: 59                 pop         ecx
  00404F20: 33 C0              xor         eax,eax
  00404F22: 5B                 pop         ebx
  00404F23: 5D                 pop         ebp
  00404F24: C3                 ret

After this CL:

?DoBlinkReleaseAssert@@YAX_N@Z:
  00404EAC: 55                 push        ebp
  00404EAD: 8B EC              mov         ebp,esp
  00404EAF: 80 7D 08 00        cmp         byte ptr [ebp+8],0
  00404EB3: 75 07              jne         00404EBC
  00404EB5: C6 05 00 00 00 00  mov         byte ptr ds:[0],0
            00
  00404EBC: 5D                 pop         ebp
  00404EBD: C3                 ret
_main:
  00404EBE: 55                 push        ebp
  00404EBF: 8B EC              mov         ebp,esp
  00404EC1: 83 7D 08 02        cmp         dword ptr [ebp+8],2
  00404EC5: 53                 push        ebx
  00404EC6: 0F 9F C3           setg        bl
  00404EC9: 53                 push        ebx
  00404ECA: E8 DD FF FF FF     call        ?DoBlinkReleaseAssert@@YAX_N@Z
  00404ECF: 53                 push        ebx
  00404ED0: E8 D7 FF FF FF     call        ?DoBlinkReleaseAssert@@YAX_N@Z
  00404ED5: 59                 pop         ecx
  00404ED6: 59                 pop         ecx
  00404ED7: 33 C0              xor         eax,eax
  00404ED9: 5B                 pop         ebx
  00404EDA: 5D                 pop         ebp
  00404EDB: C3                 ret

Amusingly, I was confused because I thought I was going crazy when
DoCheck wasn't showing up in the /disasm. But of course, it's because it
got COMDAT'd with the Blink one, as we want. :)

R=primiano@chromium.org
BUG=672699

Review-Url: https://codereview.chromium.org/2559323007
Cr-Commit-Position: refs/heads/master@{#437763}
2016-12-10 08:32:00 +00:00
akalin@chromium.org
ddb9b33b95 Make CHECK not print messages in official builds
This cuts down on the number of strings in the executable, as well as
executable code to print them.

On Linux, this saves 208kb on a stripped official build
(chrome executable file went from 64569072 bytes -> 64782064 bytes)

On OS X, this saves 209kb on an official build (Google Chrome Framework went from 51483872 bytes -> 51274984 bytes)

On Windows, this saves 139kb on an official build (chrome.dll went from 28619264 bytes -> 28477440 bytes)

Fix test failure in logging_unittest.cc in official builds.

Add new executable check_example for easy testing of changes to the
CHECK macros.

BUG=101561
TEST=

Review URL: http://codereview.chromium.org/8734021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112649 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-02 07:31:09 +00:00