Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Code coverage and UBSan bug fixes for 4.1 #72

Merged
merged 13 commits into from
Dec 15, 2017

Conversation

vedantk
Copy link
Member

@vedantk vedantk commented Dec 15, 2017

No description provided.

vedantk and others added 12 commits December 14, 2017 18:03
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318502 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 0ff70a6)
This fixes an issue seen on the coverage bot:
http://lab.llvm.org:8080/green/view/Experimental/job/clang-stage2-coverage-R/1930

Profile merging shouldn't fail if a single counter mismatch is detected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318555 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit ddb44a6)
Differential Revision: https://reviews.llvm.org/D39257

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316523 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 40fea70)
This class was split between libIR and libSupport, which breaks under
modular code generation. Move it into the one library that uses it,
ProfileData, to resolve this issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317366 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 7711c31)
This is a fix for the coverage segment builder.

If multiple regions must be popped off the active stack at once, and
more than one of them end at the same location, emit a segment using the
count from the most-recent completed region.

Fixes PR35437, rdar://35760630

Testing: invoked llvm-cov on a stage2 build of clang, additional unit
tests, check-profile

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319391 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 310bfcc)
This extends r319391. It teaches the segment builder to emit the right
completed segment when more than one region ends at the same location.

Fixes PR35495.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319990 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit dea3d88)
Differential Revision: https://reviews.llvm.org/D39447

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318228 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 6183484)
…ry data.

Summary:
That allows to get the same data as produced by "llvm-cov report",
but in JSON format, which is better for further processing by end users.

Reviewers: vsk

Reviewed By: vsk

Differential Revision: https://reviews.llvm.org/D41085

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320435 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit d4b0ab0)
This change swaps FunctionSamples to a std::map. This saves us around
17% of the memory required to parse sample profiles. To put hard numbers
on this, clang now eats around 1.3GB of RAM instead of 1.6GB while
parsing a 50MB profile.

The CPU time taken by a large profile merge (3.1GB of data across 226
files) is also reduced by ~11% by this patch (1:09.08 vs 1:01.11).

This was split out at the request of reviewers in D41152.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320764 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit f1cb8ef)
Differential Revision: https://reviews.llvm.org/D39997

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318159 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit d90634b)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318160 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit cab4300)
We need to use a stable sort on instantiation and expansion sub-views to
produce consistent output. Fortunately, we've gotten lucky and the tests
have checks for the stable order.

This is needed to unblock D39245. Once that lands, we'll have better
test coverage for sort non-determinism.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316490 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 7e80950)
@vedantk
Copy link
Member Author

vedantk commented Dec 15, 2017

Please test with following PR:
apple/swift-clang#146
apple/swift-compiler-rt#14

@swift-ci Please test OS X platform

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320439 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 15aff94)
@vedantk
Copy link
Member Author

vedantk commented Dec 15, 2017

Please test with following PR:
apple/swift-clang#146
apple/swift-compiler-rt#14

@swift-ci Please test OS X platform

@vedantk
Copy link
Member Author

vedantk commented Dec 15, 2017

Testing looks clean here: https://ci.swift.org/job/swift-llvm-PR-osx/6/

@vedantk vedantk merged commit 648314d into apple:swift-4.1-branch Dec 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants