Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
wychen cdbd19dcd5 Print detailed info in check_gn_headers.py
When --verbose is given, print more detailed info to help debugging.
The dependency of offending header files and the obj files they affect
should help determine which files to fix. The number of affected
object files can be a proxy of seriousness.

If the whitelist is not given, the extra detail would be very long.

BUG=661774
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_dbg_ng

Review-Url: https://codereview.chromium.org/2932153002
Cr-Original-Commit-Position: refs/heads/master@{#478956}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8cc3123c31e0538f0f10be6329683d9c698fbfed
2017-06-13 10:21:23 +00:00
wychen e36ed5f2d6 Make check_gn_headers.py run on Windows
BUG=661774

Review-Url: https://codereview.chromium.org/2914323002
Cr-Original-Commit-Position: refs/heads/master@{#478848}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 97580dea9404ad2c8b7916cdf3f5f30670f3d226
2017-06-13 00:52:44 +00:00
wychen e742989345 Make check_gn_headers.py more robust on the bots
Check whether the build is dirty first, and abort when dirty. This can
be skipped by using option --skip-dirty-check.

Dump JSON output on error, so that the result is still valid.

Filter out generated headers more aggressively.

Report non-existing headers in JSON as well.

BUG=725877

Review-Url: https://codereview.chromium.org/2911543002
Cr-Original-Commit-Position: refs/heads/master@{#476895}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0735fd76fd89d25935fd27d1d985ca0f3457a18a
2017-06-03 07:53:26 +00:00
wychen 450305db9b Reland of Add helpful error messages to check_gn_headers.py (patchset #1 id:1 of https://codereview.chromium.org/2905863002/ )
Reason for revert:
The real culprit is https://crrev.com/2903733004/, which was reverted.
This CL (https://crrev.com/2891363004) made it fail more gracefully, and should be kept.

Original issue's description:
> Revert of Add helpful error messages to check_gn_headers.py (patchset #3 id:40001 of https://codereview.chromium.org/2891363004/ )
>
> Reason for revert:
> This CL is likely causing massive failures:
>
> https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder/builds/84473
> to
> https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder/builds/84498
>
> and
>
> https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder%20%28dbg%29/builds/111528
> to
> https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder%20%28dbg%29/builds/111542
>
> Original issue's description:
> > Add helpful error messages to check_gn_headers.py
> >
> > Before running check_gn_headers.py, it is necessary to build all
> > in order to get the dependency info from the compiler. Directly
> > checking whether rebuilding is needed by running a build dry run
> > takes too long, so some heuristics are used instead.
> >
> > BUG=661774
> >
> > Review-Url: https://codereview.chromium.org/2891363004
> > Cr-Commit-Position: refs/heads/master@{#474588}
> > Committed: 0ceaba5ef5
>
> TBR=dpranke@chromium.org,tfarina@chromium.org,wychen@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=661774
>
> Review-Url: https://codereview.chromium.org/2905863002
> Cr-Commit-Position: refs/heads/master@{#474649}
> Committed: d3c2681426

TBR=dpranke@chromium.org,tfarina@chromium.org,mahmadi@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=661774

Review-Url: https://codereview.chromium.org/2907683002
Cr-Original-Commit-Position: refs/heads/master@{#474786}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0362911661559a7edca7d4ca9c36f1091a527b04
2017-05-25 20:37:44 +00:00
mahmadi 803879c478 Revert of Add helpful error messages to check_gn_headers.py (patchset #3 id:40001 of https://codereview.chromium.org/2891363004/ )
Reason for revert:
This CL is likely causing massive failures:

https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder/builds/84473
to
https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder/builds/84498

and

https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder%20%28dbg%29/builds/111528
to
https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder%20%28dbg%29/builds/111542

Original issue's description:
> Add helpful error messages to check_gn_headers.py
>
> Before running check_gn_headers.py, it is necessary to build all
> in order to get the dependency info from the compiler. Directly
> checking whether rebuilding is needed by running a build dry run
> takes too long, so some heuristics are used instead.
>
> BUG=661774
>
> Review-Url: https://codereview.chromium.org/2891363004
> Cr-Commit-Position: refs/heads/master@{#474588}
> Committed: 0ceaba5ef5

TBR=dpranke@chromium.org,tfarina@chromium.org,wychen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=661774

Review-Url: https://codereview.chromium.org/2905863002
Cr-Original-Commit-Position: refs/heads/master@{#474649}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d3c2681426db53550547f2bc115c3f72ba40f276
2017-05-25 14:52:02 +00:00
wychen db291721b3 Add helpful error messages to check_gn_headers.py
Before running check_gn_headers.py, it is necessary to build all
in order to get the dependency info from the compiler. Directly
checking whether rebuilding is needed by running a build dry run
takes too long, so some heuristics are used instead.

BUG=661774

Review-Url: https://codereview.chromium.org/2891363004
Cr-Original-Commit-Position: refs/heads/master@{#474588}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0ceaba5ef538ce1780578d5e948641bc27f5829b
2017-05-25 06:46:11 +00:00
wychen 0a701792e1 Handle |public| in check_gn_headers.py
If |public| of a target contains files, count them as recognized
headers as well.

BUG=661774

Review-Url: https://codereview.chromium.org/2841323003
Cr-Original-Commit-Position: refs/heads/master@{#467826}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5523578be7767b76e2eff354c98a82dcd8f653b5
2017-04-28 01:59:15 +00:00
wychen 7c160a8fdd (reland) Optimize check_gn_headers.py for speed
- Process the output of 'ninja' live through the pipe rather than
  waiting for it to finish.
- Use multiprocessing.

Benchmark results using pypy:
Before:
17.10user 14.38system 0:20.05elapsed 157%CPU (0avgtext+0avgdata 1708036maxresident)k
18.06user 15.63system 0:21.92elapsed 153%CPU (0avgtext+0avgdata 1710912maxresident)k
17.94user 13.72system 0:19.91elapsed 158%CPU (0avgtext+0avgdata 1172128maxresident)k

After:
15.28user 7.11system 0:06.25elapsed 357%CPU (0avgtext+0avgdata 319236maxresident)k
16.03user 7.74system 0:06.84elapsed 347%CPU (0avgtext+0avgdata 319396maxresident)k
15.24user 8.16system 0:06.36elapsed 367%CPU (0avgtext+0avgdata 318272maxresident)k

BUG=661774

Review-Url: https://codereview.chromium.org/2842513003
Review-Url: https://codereview.chromium.org/2846473002
Cr-Original-Commit-Position: refs/heads/master@{#467604}
Cr-Original-Original-Commit-Position: refs/heads/master@{#466900}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ef74ec9973e071da2dc5813f0b93662a0f1497bf
2017-04-27 06:28:25 +00:00
wychen 7f9ac78db8 Revert of Optimize check_gn_headers.py for speed (patchset #1 id:1 of https://codereview.chromium.org/2842513003/ )
Reason for revert:
This optimization was buggy and broke the ninja parsing.

Original issue's description:
> Optimize check_gn_headers.py for speed
>
> Process the output of 'ninja' live through the pipe rather than waiting
> for it to finish.
>
> Before:
> 20.74user 16.36system 0:24.57elapsed 151%CPU
>
> After:
> 16.63user 9.24system 0:13.94elapsed 185%CPU
>
> BUG=661774
>
> Review-Url: https://codereview.chromium.org/2842513003
> Cr-Commit-Position: refs/heads/master@{#466900}
> Committed: 6b609383cf

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

Review-Url: https://codereview.chromium.org/2844623002
Cr-Original-Commit-Position: refs/heads/master@{#467231}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c219b8a1823f884703c3546bf2cb7c17fb737d67
2017-04-26 04:09:45 +00:00
wychen dc85c82b26 Optimize check_gn_headers.py for speed
Process the output of 'ninja' live through the pipe rather than waiting
for it to finish.

Before:
20.74user 16.36system 0:24.57elapsed 151%CPU

After:
16.63user 9.24system 0:13.94elapsed 185%CPU

BUG=661774

Review-Url: https://codereview.chromium.org/2842513003
Cr-Original-Commit-Position: refs/heads/master@{#466900}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6b609383cf3669b0670b567249ff868ea4b26e43
2017-04-25 06:30:14 +00:00
wychen 91344e61c7 Add check_gn_headers.py to find missing headers in GN
BUG=661774

Review-Url: https://codereview.chromium.org/2510303002
Cr-Original-Commit-Position: refs/heads/master@{#442617}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 037f6e9e17273a1108a38cf00232d083addb6ee9
2017-01-10 17:14:56 +00:00