New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 759794 link

Starred by 3 users

Cover issue: support for clang source based code coverage

Project Member Reported by mmoroz@chromium.org, Aug 28 2017

Issue description

This is a tracking bug for our effort on switching to https://clang.llvm.org/docs/SourceBasedCodeCoverage.html

There is a doc (quite empty as of now, wrapping it up right now): https://docs.google.com/document/d/1cY5YZqrmHm_BPzk1oH8-eLBfZCojB7uB9Yb909aEaAg/edit#

And a CL enabling GN configuration for producing instrumented builds: https://chromium-review.googlesource.com/c/chromium/src/+/639054
 
Showing comments 42 - 141 of 141 Older
Blockedon: 801362
Blockedon: 801364
Blockedon: 801445
Blockedon: 816635
Blockedon: 816827
Blockedon: 817448
Blockedon: 817798
Blockedon: 801387
Blockedon: 820543
Blockedon: 821617
Blockedon: 821840
Blockedon: 821851
Blockedon: 822761
Blockedon: 824532
Blockedon: 825359
Blockedon: 825362
Blockedon: 826044
Blockedon: 826305
Blockedon: 826349
Blocking: 827220
Blockedon: 829116
Blockedon: 831939
Project Member

Comment 64 by bugdroid1@chromium.org, Apr 14 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/code-coverage/+/51ff62d7e72b6fc83ca02babb63fa5a9d1b0c915

commit 51ff62d7e72b6fc83ca02babb63fa5a9d1b0c915
Author: Max Moroz <mmoroz@google.com>
Date: Sat Apr 14 02:11:50 2018

Performance data from the bots. Full build (87 tests + 285 fuzz targets) + run + report generation takes:
* 22 hours on n1-highmem-16 (16 vCPUs, 104 GB memory)
  12 hours to build and run, 10 hours to generate reports
* 14.5 hours on n1-highmem-64 (64 vCPUs, 416 GB memory) with RAM disk
  8h:40m to build and run, 5h:50m to generate reports

Note that I generate 3 reports (Tests and Fuzzers, Tests only, Fuzzers only).
"Tests and Fuzzers" generation takes ~40% of generation time and likely to be the only type of report we will need once we resolve issue 827220.

We can also reduce the build time after resolving  issue 831939 .

Cc: -tanin@chromium.org
I'll verify the CL from  issue 831939  on the bots and then likely will delete existing two and create a new one with 32 or 64 CPUs, SSD, and a reasonable amount of ram (i.e. no RAM disk)
@mmoroz - do you have a link to the full reports? I'm curious to see what things look like.
Absolutely! go/chrome-coverage
Blockedon: 834781
Project Member

Comment 70 by bugdroid1@chromium.org, Apr 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/915eb5af3f17be4c453faac318b715e18210d61f

commit 915eb5af3f17be4c453faac318b715e18210d61f
Author: Max Moroz <mmoroz@chromium.org>
Date: Tue Apr 24 16:10:35 2018

Add an assertion against building fuzz targets with code coverage on Mac.

Bug:  790747 ,  759794 
Change-Id: Ic95c5217c6781ed5a8628200397a128f418d1a0d
Reviewed-on: https://chromium-review.googlesource.com/1024444
Reviewed-by: Abhishek Arya <inferno@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553148}
[modify] https://crrev.com/915eb5af3f17be4c453faac318b715e18210d61f/testing/libfuzzer/fuzzer_test.gni

Blockedon: 836663
Project Member

Comment 72 by bugdroid1@chromium.org, Apr 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c5e364a416be58cf68479dda3b7415135ae5b514

commit c5e364a416be58cf68479dda3b7415135ae5b514
Author: Max Moroz <mmoroz@chromium.org>
Date: Wed Apr 25 23:19:49 2018

[Code Coverage] Add FAQ entries regarding crashes and warnings.

Also, alpha-ordered the links.

Bug: 829116,  759794 
Change-Id: I5e71079964122591df68268136b23de3f605a8d6
Reviewed-on: https://chromium-review.googlesource.com/1028838
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Reviewed-by: Abhishek Arya <inferno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553810}
[modify] https://crrev.com/c5e364a416be58cf68479dda3b7415135ae5b514/docs/code_coverage.md

Blockedon: 833912
Out of curiosity I generated a few reports using the same revision:

https://chrome-coverage.storage.googleapis.com/chrome/552556_2/index.html
https://chrome-coverage.storage.googleapis.com/chrome/552556_3/index.html
https://chrome-coverage.storage.googleapis.com/chrome/552556_4/index.html
https://chrome-coverage.storage.googleapis.com/chrome/552556_5/index.html

The total numbers are different and it's quite hard to say why. I see the following potential reasons:

1) randomness in tests -- this is bad, we can't do anything about it, but probably we don't have many of such tests

2) different corpus provided to fuzz targets -- that's possible as the reports mentioned above were generated on different days (i.e. using different corpus backups); if you look at "Fuzzers only" reports at https://chrome-coverage.storage.googleapis.com/index.html you can see some cases where numbers have a similar difference across revisions, even though for the tests coverage doesn't change much, e.g. r552599 and r552183

3) flakiness in the merge process due to the warnings -- known as  issue 801364  and is expected to be fixed now thanks  issue 836820  got resolved


Project Member

Comment 74 by bugdroid1@chromium.org, Apr 26 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/code-coverage/+/9b17c7216b2ca7fc8c2e8d825cfe44c1ec519451

commit 9b17c7216b2ca7fc8c2e8d825cfe44c1ec519451
Author: Max Moroz <mmoroz@google.com>
Date: Thu Apr 26 02:50:35 2018

Re c#73 point 2), I have separate reports generated for fuzz targets only, and the numbers in there are fairly stable, so it can't be source of the flakiness:

https://chrome-coverage.storage.googleapis.com/chrome/552556_2_fuzzers_only/index.html
https://chrome-coverage.storage.googleapis.com/chrome/552556_3_fuzzers_only/index.html
https://chrome-coverage.storage.googleapis.com/chrome/552556_4_fuzzers_only/index.html
https://chrome-coverage.storage.googleapis.com/chrome/552556_5_fuzzers_only/index.html

I'll try re-running the whole thing once again with same same corpus, will see how precisely the same the numbers will be.
Blockedon: 837384
Blockedon: 837385
Project Member

Comment 78 by bugdroid1@chromium.org, Apr 27 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/code-coverage/+/56e4d332c3bb97421517903747c72ded366b0350

commit 56e4d332c3bb97421517903747c72ded366b0350
Author: Max Moroz <mmoroz@google.com>
Date: Fri Apr 27 16:12:26 2018

Project Member

Comment 79 by bugdroid1@chromium.org, Apr 27 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/code-coverage/+/f0cb6e64e373b20d031e1d0c7e78e23702aed10d

commit f0cb6e64e373b20d031e1d0c7e78e23702aed10d
Author: Max Moroz <mmoroz@google.com>
Date: Fri Apr 27 17:53:44 2018

Blockedon: 837816
Re c#75: here are stats for two runs with exactly the same corpus:

https://chrome-coverage.storage.googleapis.com/chrome/552556_5_fuzzers_only/index.html

https://chrome-coverage.storage.googleapis.com/chrome/552556_6_fuzzers_only/index.html

Looks pretty much the same. Also note that that revision doesn't include fix for  issue 801364 , since which number became much more stable overall.


Project Member

Comment 82 by bugdroid1@chromium.org, Apr 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5604eb52ec1dfd9105b463dd66affe24836d6a26

commit 5604eb52ec1dfd9105b463dd66affe24836d6a26
Author: Max Moroz <mmoroz@chromium.org>
Date: Mon Apr 30 15:18:55 2018

Disable code coverage config for nonsfi_libc_free_nexe target.

The same reason as for sanitizers that are already disabled, as the target
doesn't use libc which is needed for compiler-rt instrumentations.

Bug: 789981,  759794 
Change-Id: I3a997bd017154ba1fc41b3b39ff74af3627637a5
Reviewed-on: https://chromium-review.googlesource.com/1034284
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554757}
[modify] https://crrev.com/5604eb52ec1dfd9105b463dd66affe24836d6a26/chrome/test/data/nacl/BUILD.gn

Project Member

Comment 83 by bugdroid1@chromium.org, Apr 30 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/code-coverage/+/9281b191858db58ab663f98520878e02a2557bfb

commit 9281b191858db58ab663f98520878e02a2557bfb
Author: Max Moroz <mmoroz@google.com>
Date: Mon Apr 30 19:47:00 2018

Blockedon: 838990
Blockedon: 838997
Blockedon: 839978
Blockedon: 840123
Blockedon: 840385
Project Member

Comment 89 by bugdroid1@chromium.org, May 7 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/code-coverage/+/f155f551115c308d8237c49dd69be589d1a6d94b

commit f155f551115c308d8237c49dd69be589d1a6d94b
Author: Max Moroz <mmoroz@google.com>
Date: Mon May 07 21:27:45 2018

Blockedon: 842202
Blockedon: 842289
Blockedon: 842299
Blockedon: 842300
Blockedon: 842285
Blockedon: 842303
Blockedon: 842307
Blockedon: 842309
Blockedon: 842359
Blockedon: 842424
Blockedon: 842475
Blockedon: 842745
Blockedon: 842760
Blockedon: 842851
Blockedon: 843185
Blockedon: 843356
Project Member

Comment 106 by bugdroid1@chromium.org, May 17 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/code-coverage/+/f8de962524832f978b66414f1c0189a8cde26f42

commit f8de962524832f978b66414f1c0189a8cde26f42
Author: Max Moroz <mmoroz@google.com>
Date: Thu May 17 19:53:17 2018

Project Member

Comment 107 by bugdroid1@chromium.org, May 18 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/code-coverage/+/45c1abcaa14e40d6b2ad90978918493cdc6f6281

commit 45c1abcaa14e40d6b2ad90978918493cdc6f6281
Author: Max Moroz <mmoroz@google.com>
Date: Fri May 18 14:08:47 2018

Blockedon: 869451
Blockedon: 848834
Blockedon: 854226
Blockedon: 843743
Blockedon: 852469
Blockedon: 879389
Project Member

Comment 114 by bugdroid1@chromium.org, Sep 5

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/code-coverage/+/2e66d4bef9bc76bcce8e773ebd5fd477deee6dbe

commit 2e66d4bef9bc76bcce8e773ebd5fd477deee6dbe
Author: Max Moroz <mmoroz@google.com>
Date: Wed Sep 05 14:02:10 2018

Blockedon: 882511
Blockedon: 884682
Blockedon: 884688
Project Member

Comment 118 by bugdroid1@chromium.org, Nov 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7d3437a87caa2a437ab665579234ce4a6d2d2088

commit 7d3437a87caa2a437ab665579234ce4a6d2d2088
Author: Max Moroz <mmoroz@chromium.org>
Date: Thu Nov 15 00:49:40 2018

[CSA] Remove an obsolette flag for Clang Static Analyzer.

That flag is now always enabled by default (https://reviews.llvm.org/D51251)
and the analyzer errors out when the flag is passed via command line.

Also adding myself as an owner for Clang Static Analyzer and Code Coverage
related files.

Bug: 901486,  759794 
Change-Id: I54c9988c79f13287bb0580637d1a3ae4aa46bba7
Reviewed-on: https://chromium-review.googlesource.com/c/1330758
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608199}
[modify] https://crrev.com/7d3437a87caa2a437ab665579234ce4a6d2d2088/build/toolchain/OWNERS
[modify] https://crrev.com/7d3437a87caa2a437ab665579234ce4a6d2d2088/build/toolchain/clang_static_analyzer_wrapper.py

Blockedon: 906275
Blockedon: 906634
Blocking: -827220
Blockedon: 827220
Owner: liaoyuke@chromium.org
Assigned to liaoyuke@ as Yuke has been leading the code coverage effort since Oct.
Good point! Should we close this one and file a new issue like "Cover issue: Code Coverage on Chrome Infra"? I think it would be better because this bug is already huge and hard to read, plus it covers mostly my previous contributions -- that won't be very convenient for Yuke or any other owner.

If you agree to file a new tracking bug, I'll go through the open blockers of this one and either close them or block the new issue on it. Then I'll just close this one, since the initial support is implemented.
Re #124: I'd defer to Yuke to take care of the rest :)
Owner: mmoroz@chromium.org
Status: Fixed (was: Started)
Re #124 and #125, yes, I think it makes perfect sense.
Blockedon: -701825
Blockedon: -801445
Blockedon: -884682
Blockedon: -879389
Blockedon: -843356
Blockedon: -820543
Blockedon: -826044
Blockedon: -827220
Blockedon: -843185
Blockedon: -842760
Blockedon: -842745
Blockedon: -842475
Blockedon: -842307
Blockedon: -842299
Project Member

Comment 141 by bugdroid1@chromium.org, Jan 9

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/tools/code-coverage/+/1e0498a5cadfd06d3e976b63f6ef13c6eeaf9e25

commit 1e0498a5cadfd06d3e976b63f6ef13c6eeaf9e25
Author: Max Moroz <mmoroz@google.com>
Date: Wed Jan 09 21:26:36 2019

Showing comments 42 - 141 of 141 Older

Sign in to add a comment