0
Commit Graph

29 Commits

Author SHA1 Message Date
Avi Drissman
73a09d1a67 Update copyright headers in build/, build_overrides/, and buildtools/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

An earlier version of this CL, https://crrev.com/c/3879808,
was reverted due to an issue that was resolved with
https://crrev.com/c/3881211.

No-Try: true
Bug: 1098010
Change-Id: I91174ff0a9dd8b6dee79e6cba8209b614ce2b712
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3884220
Reviewed-by: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044745}
2022-09-08 20:33:38 +00:00
Rebekah Potter
184a820046 Revert "Update copyright headers in build/, build_overrides/, and buildtools/"
This reverts commit 8996d5a5ca.

Reason for revert: Breaks android-binary-size bot, see
https://bugs.chromium.org/p/chromium/issues/detail?id=1361092

Original change's description:
> Update copyright headers in build/, build_overrides/, and buildtools/
>
> The methodology used to generate this CL is documented in
> https://crbug.com/1098010#c21.
>
> No-Try: true
> Bug: 1098010
> Change-Id: I0323d0734081fc1aaf3b9ec3b8184411fe1a368a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3879808
> Auto-Submit: Avi Drissman <avi@chromium.org>
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Owners-Override: Avi Drissman <avi@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1044227}

Bug: 1098010
Change-Id: Ie1b5a07d859e98588c1497220aac54834ea5d7f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3880816
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Nidhi Jaju <nidhijaju@chromium.org>
Commit-Queue: Nidhi Jaju <nidhijaju@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044284}
2022-09-08 01:08:54 +00:00
Avi Drissman
8996d5a5ca Update copyright headers in build/, build_overrides/, and buildtools/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c21.

No-Try: true
Bug: 1098010
Change-Id: I0323d0734081fc1aaf3b9ec3b8184411fe1a368a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3879808
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044227}
2022-09-07 22:46:30 +00:00
Bruce Dawson
09c1bd004f Reland "Put source and object file names at the front"
This reverts commit c59e5ef59d.

Reason for revert: This is fixed now.

Apologies for the breakage, but I guess that is always the risk when
adding additional checks.

I found all the places that called clang_code_coverage_wrapper.py and
modified the command lines to guarantee that the build commands would
be run - changing clang_code_coverage_wrapper.py does not do this. This
let me iteratively discover that I needed to add .mm, .m, and .S to the
list of valid extensions. Then I removed the command-line modifications,
which were just extra spaces added.

I could modify more command lines to move source files closer to the
front but I don't want to expand the scope of this change when I'm
primarily just trying to get it to work.

Original change's description:
> Revert "Put source and object file names at the front"
>
> This reverts commit 769565cd01.
>
> Reason for revert: This change appears to cause a breakage on iOS for .mm files (https://ci.chromium.org/p/chromium/builders/try/ios-simulator?cursor=id%3E8843484712786022016)
>
> Original change's description:
> > Put source and object file names at the front
> >
> > When monitoring compilation to look for anomalously slow or memory
> > -intensive or whatever compiles the most important piece of information
> > is the name of the file being compiled. Therefore this should be _first_
> > instead of almost last.
> >
> > Due to the way that clang_code_coverage_wrapper.py works the source file
> > name has to be immediately after the /c option. This undocumented rule
> > caused confusing failures in early versions of this change so this
> > change also documents and enforces this rule.
> >
> > This change is essentially the compiler equivalent of the linker
> > command-line change made in crrev.com/c/2705598
> >
> > Change-Id: I96dd34d6157a8f9c3875180fb53e555cbd9a3975
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2981118
> > Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
> > Reviewed-by: Dirk Pranke <dpranke@google.com>
> > Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#895898}
>
> Change-Id: Id9fc985376fd488e190f996574f9316a9eaf4127
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2986433
> Commit-Queue: Zain Afzal <zafzal@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Zain Afzal <zafzal@google.com>
> Owners-Override: Zain Afzal <zafzal@google.com>
> Cr-Commit-Position: refs/heads/master@{#895937}

Change-Id: Ib69143f8c800ac0525dcea80078b1781e2572187
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2988286
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#896264}
2021-06-26 00:06:11 +00:00
Michael Crouse
c59e5ef59d Revert "Put source and object file names at the front"
This reverts commit 769565cd01.

Reason for revert: This change appears to cause a breakage on iOS for .mm files (https://ci.chromium.org/p/chromium/builders/try/ios-simulator?cursor=id%3E8843484712786022016)

Original change's description:
> Put source and object file names at the front
>
> When monitoring compilation to look for anomalously slow or memory
> -intensive or whatever compiles the most important piece of information
> is the name of the file being compiled. Therefore this should be _first_
> instead of almost last.
>
> Due to the way that clang_code_coverage_wrapper.py works the source file
> name has to be immediately after the /c option. This undocumented rule
> caused confusing failures in early versions of this change so this
> change also documents and enforces this rule.
>
> This change is essentially the compiler equivalent of the linker
> command-line change made in crrev.com/c/2705598
>
> Change-Id: I96dd34d6157a8f9c3875180fb53e555cbd9a3975
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2981118
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#895898}

Change-Id: Id9fc985376fd488e190f996574f9316a9eaf4127
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2986433
Commit-Queue: Zain Afzal <zafzal@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Zain Afzal <zafzal@google.com>
Owners-Override: Zain Afzal <zafzal@google.com>
Cr-Commit-Position: refs/heads/master@{#895937}
2021-06-25 06:12:38 +00:00
Bruce Dawson
769565cd01 Put source and object file names at the front
When monitoring compilation to look for anomalously slow or memory
-intensive or whatever compiles the most important piece of information
is the name of the file being compiled. Therefore this should be _first_
instead of almost last.

Due to the way that clang_code_coverage_wrapper.py works the source file
name has to be immediately after the /c option. This undocumented rule
caused confusing failures in early versions of this change so this
change also documents and enforces this rule.

This change is essentially the compiler equivalent of the linker
command-line change made in crrev.com/c/2705598

Change-Id: I96dd34d6157a8f9c3875180fb53e555cbd9a3975
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2981118
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#895898}
2021-06-25 02:45:47 +00:00
Chong Gu
1809f31935 [Code Coverage] Add Fuchsia coverage exclusion files.
Exclude files that are causing builds to crash when building with code coverage for Fuchsia.

Bug: 1174725
Change-Id: Ied9580532598c22a9ad6e54969bee6e215c55845
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2698581
Auto-Submit: Chong Gu <chonggu@google.com>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#854856}
2021-02-17 18:12:40 +00:00
Sajjad Mirza
72b3140dc6 [code coverage] Force instrumentation for clang_profiling.cc on Mac.
Some flakiness has been observed on mac-rel after coverage was enabled
for that builder. The problems correlate with builds that have no
changed source files in Chrome, so we think that forcing coverage for
clang_profiling.cc should solve the problem.

Also remove an outdated comment.

Bug: 1141727
Change-Id: I7ebaeda2ae3a724965e7afa65f20164340c544d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2559320
Auto-Submit: Sajjad Mirza <sajjadm@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831035}
2020-11-25 16:45:03 +00:00
Zhaoyang Li
7540893b0c [code coverage] Remove multiple sets of code coverage compiler flags.
The wrapper currently removes only one set of the flags for code
coverage partial instrumentation. But there can be situation where
multiple sets of same flags are in compile command and all of these need
to be removed.

Bug: 1137569
Change-Id: I32c48710fd9c0c66d7c218f329efcd222704607e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466976
Commit-Queue: Zhaoyang Li <zhaoyangli@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816694}
2020-10-13 19:06:34 +00:00
Evan Stade
92b69ca063 Move //chrome/common/media_router to //components/media_router/common
Design doc: go/castinwl

Bug: 1057100
Change-Id: Iabb0cdf3e949737e1cbc5b99f3f8ebeb6297a820
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367696
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Takumi Fujimoto <takumif@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800789}
2020-08-21 23:55:58 +00:00
Sebastien Marchand
bd02bc29ef Reland "Make the coverage config reusable for generic profiling."
This reverts commit 212853047a.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Make the coverage config reusable for generic profiling."
>
> This reverts commit c7695f6312.
>
> Reason for revert: Possible reason for win10_chromium_x64_rel_ng failing builds with error:
>
> lld-link: error: undefined symbol: __llvm_profile_dump
> >>> referenced by .\..\..\base\test\clang_profiling.cc:23
> >>>               obj/base\base/clang_profiling.obj:(void __cdecl base::WriteClangProfilingProfile(void))
>
> Original change's description:
> > Make the coverage config reusable for generic profiling.
> >
> > Most of the coverage configuration can be re-used for general
> > Clang-based profiling (e.g. the profiling step of a PGO build).
> > This changes most of the |use_clang_coverage| checks to
> > |use_clang_profiling|.
> >
> > The toolchain opt-out option is still limited to the coverage
> > builds (grep for "toolchain_use_clang_coverage" in CodeSearch).
> > I.e. targets built simply with |use_clang_profiling=true| won't
> > be opted out by the clang_code_coverage_wrapper.py script.
> >
> > This CL is a pure refactoring with no functional change.
> > Getting profiling information from the sandboxed renderers work
> > this way:
> > - After creating a new child process the browser will open a
> >   profiling file for this process and pass the handle to the
> >   child via the SetProfilingProfile Mojo call (see change in
> >   content/browser/renderer_host/render_process_host_impl.cc).
> > - This process will used by the LLVM instrumentation to record
> >   profiling information.
> > - When terminating, child processes will call
> >   WriteClangProfilingProfile to write the data to the profiling
> >   data file.
> > - Once all the raw profile data files have been collected,
> >   they'll be merged (via the "llvm-profdata" tool) and used.
> >
> > Note that this isn't meant to be enabled into any build that
> > will be shipped to users (a profiling build is usually 10x
> > bigger than a normal build anyway, not really shippable).
> >
> > The goal of this refactoring is to make it possible to reuse
> > this mechanism for the instrumentation step of PGO builds.
> >
> > Bug: 1058979
> > Change-Id: If8321234f6b6f86befd81f6e9e068a342728d605
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2090493
> > Reviewed-by: Will Harris <wfh@chromium.org>
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Reviewed-by: Scott Violet <sky@chromium.org>
> > Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> > Reviewed-by: Sajjad Mirza <sajjadm@chromium.org>
> > Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#749015}
>
> TBR=sky@chromium.org,thakis@chromium.org,wfh@chromium.org,sebmarchand@chromium.org,liaoyuke@chromium.org,sajjadm@chromium.org
>
> Change-Id: I6aaf638f6385afe35c488575aac84e3e952b76a3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1058979
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096332
> Reviewed-by: Jeevan Shikaram <jshikaram@chromium.org>
> Commit-Queue: Jeevan Shikaram <jshikaram@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#749040}

TBR=sky@chromium.org,thakis@chromium.org,wfh@chromium.org,sebmarchand@chromium.org,liaoyuke@chromium.org,sajjadm@chromium.org,jshikaram@chromium.org

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1058979
Change-Id: I5492c81b707e5741bd7c494893e3bc7953221263
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2097305
Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749185}
2020-03-11 15:53:36 +00:00
Olivier Li
0504bb0dcf [code coverage] Add files to exclusion list to unblock a CL.
Similar fix to https://crrev.com/c/2056205 but adding the files to the
windows list too since that bot is failing now also for my CL.

Bug: 1051561
Change-Id: Ia13d9264a00ed935ff5bcbaba0760483c51aa50a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2057243
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Commit-Queue: Oliver Li <olivierli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741469}
2020-02-14 17:06:22 +00:00
Sajjad Mirza
836033f9f3 [code coverage] Add files to exclusion list to unblock a CL.
TBR=liaoyuke@chromium.org

Bug: 1051561
Change-Id: I6bf84e01a7bbc3c9553d5fb8a29524004df5af0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2056205
Reviewed-by: Sajjad Mirza <sajjadm@chromium.org>
Commit-Queue: Sajjad Mirza <sajjadm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741325}
2020-02-14 02:37:39 +00:00
Olivier Li
13a2ca0a5c Exclude coverage on some base/ files
There is nothing wrong with having coverage in those files but for some
reason my crrev.com/2046404 change that includes them breaks
angle_unittests by making code coverage tooling add some output to
stderr of one of their binaries.

Until the problem of the stderr output is resolved I need a way to pass
CQ.

Here I'm adding the files I think are causing the problem to see if my
cl will pass CQ after.

Bug: 1051561
Change-Id: I14c4b195bda151bbddc57fdd573b2c93c2a59b63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2054527
Commit-Queue: Oliver Li <olivierli@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741282}
2020-02-14 01:06:42 +00:00
Yuke Liao
40543c9f7a [code coverage] Skip instrumenting keycode_converter.cc
This file caused a static initializer to be generated, which shouldn't.

TBR=nodir@chromium.org, sajjadm@chromium.org

Bug: 990948
Change-Id: I79f8e23d71688c20dd5aaaaff50515a0bb88ba24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1989985
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#729001}
2020-01-07 18:27:04 +00:00
Sajjad Mirza
18f89f24d5 [code coverage] Force coverage for clang_coverage.cc
On Windows it is possible for the coverage tryjob to compile a target
that includes clang_coverage.cc but does not instrument any files.
This causes a link-time failure, as clang_coverage.cc refers to
__llvm_profile_dump, but with no instrumented files the compiler will
not include the profile runtime library into the target. The symbol
remains unresolved.

To work around this, we can force coverage instrumentation for the
clang_coverage.cc file itself, thus ensuring that any target that
includes it will always have the profiling runtime pulled in.

Bug: 990480
Change-Id: Ia6e1f003baaac4a050eec235942aa5a5e345ec52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1978036
Commit-Queue: Sajjad Mirza <sajjadm@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726934}
2019-12-20 21:18:12 +00:00
Sajjad Mirza
e677802c93 [code coverage] Normalize source file path in compile wrapper.
Paths in `--files-to-instrument` are expected to be normalized OS-native
paths, so the input source file has to be converted to match.

This is most relevant on Windows, where GN creates build commands that
use `/` for filesystem paths, but the canonical form should use `\`.

Bug: 990480
Change-Id: If7b5da729f0a98ec7945092b0f228cebd50be3a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1973360
Commit-Queue: Sajjad Mirza <sajjadm@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726120}
2019-12-18 21:51:59 +00:00
Yun Liu
e643df75bc [code coverage] Add coverage exclusion files for Android
Bug: 985574
Change-Id: I06d11dd466b7cb803b2324a45848ec09c9f28799
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879324
Commit-Queue: Yun Liu <yliuyliu@google.com>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709573}
2019-10-25 19:11:33 +00:00
Sajjad Mirza
750bd0b90e [code coverage] Invoke compiler wrapper script on Windows.
Add Windows support into the wrapper and have the toolchain invoke it
when use_clang_coverage = true.

Also clean-up the code for the default exclusion list.

Bug: 989828
Change-Id: Ie4e40721e7b007831c299978b37315dad1c521c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863328
Commit-Queue: Sajjad Mirza <sajjadm@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706703}
2019-10-16 23:39:51 +00:00
Yuke Liao
8098d70548 [code coverage] Skip instrumenting files that has triggers a SI bug
Change-Id: I4c1ba8139847fd6a72f0d9ba6e0e1f8d62d927b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1736893
Reviewed-by: Takumi Fujimoto <takumif@chromium.org>
Commit-Queue: Takumi Fujimoto <takumif@chromium.org>
Auto-Submit: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684181}
2019-08-05 23:57:41 +00:00
Raul Tambre
9e24293bf2 //build: Convert print statements to Python 3 style
Ran "2to3 -w -n -f print ./base" and manually added imports.
There are no intended behaviour changes.

Bug: 941669
Change-Id: Ie2830e213eae3a5d7753ce503020e02811b726d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1585890
Commit-Queue: Raul Tambre <raul@tambre.ee>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Cr-Commit-Position: refs/heads/master@{#658917}
2019-05-12 06:11:07 +00:00
Sajjad Mirza
bf9e66a59b Reland "Reland "Adding an exclusion list to the coverage wrapper script.""
This is a reland of cdc92f96b8

Original change's description:
> Reland "Adding an exclusion list to the coverage wrapper script."
> 
> This is a reland of 6b7213a453
> 
> Original change's description:
> > Adding an exclusion list to the coverage wrapper script.
> > 
> > The script now assumes GN adds coverage flags to the cflags for each
> > source file. The script removes the flag if the file is in an exclusion
> > list, or if `--files-to-instrument` is set it will also remove flags if
> > the file is not listed in that argument.
> > 
> > The script supports multiple exclusion lists that can be selected with
> > the `--target-os` flag.
> > 
> > It's expected that GN will set these flags correctly and invoke the
> > script in all coverage builds. http://crrev.com/c/1496002 does that.
> > 
> > 
> > Bug: 918215
> > Change-Id: I4454f67067a083581f31a22cfef85368825789f9
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495994
> > Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> > Reviewed-by: Max Moroz <mmoroz@chromium.org>
> > Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> > Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#637892}
> 
> Bug: 918215
> Change-Id: I1254d288ff263ff94c46b46e6be99738e31b9574
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506974
> Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> Reviewed-by: Max Moroz <mmoroz@chromium.org>
> Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> Cr-Commit-Position: refs/heads/master@{#638362}

Bug: 918215
Change-Id: Ibd1e68a066bddd69e46c9cb32fcd9df209d97a1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1509459
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Commit-Queue: Sajjad Mirza <sajjadm@google.com>
Cr-Commit-Position: refs/heads/master@{#638758}
2019-03-07 21:49:06 +00:00
Yuke Liao
20eb9bf1ab Revert "Reland "Adding an exclusion list to the coverage wrapper script.""
This reverts commit cdc92f96b8.

Reason for revert: Since the other one was reverted: https://chromium-review.googlesource.com/c/chromium/src/+/1508457

Original change's description:
> Reland "Adding an exclusion list to the coverage wrapper script."
> 
> This is a reland of 6b7213a453
> 
> Original change's description:
> > Adding an exclusion list to the coverage wrapper script.
> > 
> > The script now assumes GN adds coverage flags to the cflags for each
> > source file. The script removes the flag if the file is in an exclusion
> > list, or if `--files-to-instrument` is set it will also remove flags if
> > the file is not listed in that argument.
> > 
> > The script supports multiple exclusion lists that can be selected with
> > the `--target-os` flag.
> > 
> > It's expected that GN will set these flags correctly and invoke the
> > script in all coverage builds. http://crrev.com/c/1496002 does that.
> > 
> > 
> > Bug: 918215
> > Change-Id: I4454f67067a083581f31a22cfef85368825789f9
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495994
> > Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> > Reviewed-by: Max Moroz <mmoroz@chromium.org>
> > Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> > Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#637892}
> 
> Bug: 918215
> Change-Id: I1254d288ff263ff94c46b46e6be99738e31b9574
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506974
> Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> Reviewed-by: Max Moroz <mmoroz@chromium.org>
> Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> Cr-Commit-Position: refs/heads/master@{#638362}

TBR=stgao@chromium.org,robertocn@chromium.org,mmoroz@chromium.org,liaoyuke@chromium.org,sajjadm@google.com

Change-Id: I43834e520ccadd680217e80fc6ca40a210684b3c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 918215
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1508597
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638587}
2019-03-07 16:21:03 +00:00
Sajjad Mirza
cdc92f96b8 Reland "Adding an exclusion list to the coverage wrapper script."
This is a reland of 6b7213a453

Original change's description:
> Adding an exclusion list to the coverage wrapper script.
> 
> The script now assumes GN adds coverage flags to the cflags for each
> source file. The script removes the flag if the file is in an exclusion
> list, or if `--files-to-instrument` is set it will also remove flags if
> the file is not listed in that argument.
> 
> The script supports multiple exclusion lists that can be selected with
> the `--target-os` flag.
> 
> It's expected that GN will set these flags correctly and invoke the
> script in all coverage builds. http://crrev.com/c/1496002 does that.
> 
> 
> Bug: 918215
> Change-Id: I4454f67067a083581f31a22cfef85368825789f9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495994
> Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> Reviewed-by: Max Moroz <mmoroz@chromium.org>
> Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#637892}

Bug: 918215
Change-Id: I1254d288ff263ff94c46b46e6be99738e31b9574
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506974
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Commit-Queue: Sajjad Mirza <sajjadm@google.com>
Cr-Commit-Position: refs/heads/master@{#638362}
2019-03-07 00:29:10 +00:00
Sajjad Mirza
8a9b3730aa Revert "Adding an exclusion list to the coverage wrapper script."
This reverts commit 6b7213a453.

Reason for revert: This CL will break per-CL coverage gathering without CL 1496002, and that other CL is not ready yet.

Original change's description:
> Adding an exclusion list to the coverage wrapper script.
> 
> The script now assumes GN adds coverage flags to the cflags for each
> source file. The script removes the flag if the file is in an exclusion
> list, or if `--files-to-instrument` is set it will also remove flags if
> the file is not listed in that argument.
> 
> The script supports multiple exclusion lists that can be selected with
> the `--target-os` flag.
> 
> It's expected that GN will set these flags correctly and invoke the
> script in all coverage builds. http://crrev.com/c/1496002 does that.
> 
> 
> Bug: 918215
> Change-Id: I4454f67067a083581f31a22cfef85368825789f9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495994
> Commit-Queue: Sajjad Mirza <sajjadm@google.com>
> Reviewed-by: Max Moroz <mmoroz@chromium.org>
> Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#637892}

TBR=stgao@chromium.org,robertocn@chromium.org,mmoroz@chromium.org,liaoyuke@chromium.org,sajjadm@google.com

Change-Id: I0cadb9c3d3ed0600648e273ffe58e7dc3f6ef7f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 918215
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504960
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638167}
2019-03-06 17:19:34 +00:00
Sajjad Mirza
6b7213a453 Adding an exclusion list to the coverage wrapper script.
The script now assumes GN adds coverage flags to the cflags for each
source file. The script removes the flag if the file is in an exclusion
list, or if `--files-to-instrument` is set it will also remove flags if
the file is not listed in that argument.

The script supports multiple exclusion lists that can be selected with
the `--target-os` flag.

It's expected that GN will set these flags correctly and invoke the
script in all coverage builds. http://crrev.com/c/1496002 does that.


Bug: 918215
Change-Id: I4454f67067a083581f31a22cfef85368825789f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1495994
Commit-Queue: Sajjad Mirza <sajjadm@google.com>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637892}
2019-03-05 23:23:35 +00:00
Sajjad Mirza
49c00e3057 Adding optimization flags necessary for building on MacOS.
These flags are present in build/config/coverage/BUILD.gn. They
need to be copied to the coverage script.

Bug: 918215
Change-Id: I0c5670f5e826b0640e68fd667f5b69006639b10f
Reviewed-on: https://chromium-review.googlesource.com/c/1497291
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Commit-Queue: Sajjad Mirza <sajjadm@google.com>
Cr-Commit-Position: refs/heads/master@{#636989}
2019-03-01 22:46:52 +00:00
Yuke Liao
5eff782d19 [code coverage] Add optimization cflags to coverage compiler wrapper
This CL adds "-mllvm" and "-limited-coverage-experimental=true" cflags
to the code coverage compiler wrapper because they're critical for
reducing the size of the generated binaries.

Bug: 933512
Change-Id: I0d61a36b71605fc160fea164f280206084afe302
Reviewed-on: https://chromium-review.googlesource.com/c/1493383
Auto-Submit: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636304}
2019-02-28 03:56:24 +00:00
Yuke Liao
bb571bd6cb [Code Coverage] Implement Clang code coverage compiler wrapper
This CL implements the Clang code coverage compiler wrapper, which can
be used to instrument a subset of source files, and the main use case
is to enable generating code coverage reports at per-cl level during
try jobs.

This CL only focuses on the wrapper itself, how to hook this wrapper
into the build system will be addressed in a separate CL.

Bug: 898695
Change-Id: Idb21640b5566ce78089059b3d0116390b488a383
Reviewed-on: https://chromium-review.googlesource.com/c/1301969
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604381}
2018-10-31 21:51:52 +00:00