New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use profdata for collecting code coverage for clang #5881

iirina opened this Issue Aug 14, 2018 · 0 comments


None yet
2 participants
Copy link

iirina commented Aug 14, 2018

Currently C++ coverage is 2x slower than just running the corresponding tests. The goal is to have similar times for running bazel test and bazel coverage on the same targets. When clang is used profdata is the fastest and reliable way for computing code coverage results.

@iirina iirina self-assigned this Aug 14, 2018

@iirina iirina referenced this issue Aug 14, 2018


Make C++ code coverage collection faster #5882

1 of 2 tasks complete

@iirina iirina added P2 and removed P3 labels Aug 14, 2018

bazel-io pushed a commit that referenced this issue Sep 21, 2018

Acknowledge profdata files in CoverageOutputGenerator.
This PR makes `CoverageOutputGenerator` aware that `` might generate `.profdata` files.

There must at most one `.profdata` file generated per test otherwise `CoverageOutputGenerator` doesn't know how to merge them.

If there is one `.profdata` file then there must be no other type of coverage reports (`.dat`, `.gcov`) generated before `CoverageOutputGenerator` is invoked, otherwise there is no way to merge them.

If there is one `.profdata` file and no other coverage reports we copy the content of the `.profdata` file to the final coverage output file. This is not ideal but it unblocks some Bazel C++ coverage users.

This is temporary until #5881 will be fixed.

Closes #6192.

PiperOrigin-RevId: 213989514
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment