summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData/CoverageMapping.cpp
Commit message (Collapse)AuthorAgeFilesLines
* llvm-cov: Sink some reporting logic into CoverageMappingJustin Bogner2014-11-141-1/+9
| | | | | | | | This teaches CoverageMapping::getCoveredFunctions to filter to a particular file and uses that to replace most of the logic found in llvm-cov report. llvm-svn: 221962
* Eliminate some deep std::vector copies. NFC.Benjamin Kramer2014-10-031-1/+1
| | | | llvm-svn: 218999
* InstrProf: Avoid linear search in a hot loopJustin Bogner2014-10-021-5/+6
| | | | | | | | | | Every time we were adding or removing an expression when generating a coverage mapping we were doing a linear search to try and deduplicate the list. The indices in the list are important, so we can't just replace it by a DenseMap entirely, but an auxilliary DenseMap for fast lookup massively improves the performance issues I was seeing here. llvm-svn: 218892
* Reapply "InstrProf: Don't keep a large sparse list around just to zero it"Justin Bogner2014-10-021-24/+43
| | | | | | | | | | When I was preparing r218879 for commit, I removed an early return that I decided was just noise. It wasn't. This is r218879 no-crash edition. This reverts commit r218881, reapplying r218879. llvm-svn: 218887
* Revert "InstrProf: Don't keep a large sparse list around just to zero it"Justin Bogner2014-10-021-38/+24
| | | | | | | | This seems to be crashing on some buildbots. Reverting to investigate. This reverts commit r218879. llvm-svn: 218881
* InstrProf: Don't keep a large sparse list around just to zero itJustin Bogner2014-10-021-24/+38
| | | | | | | | | | | | | | | | | | | | The Terms vector here represented a polynomial of of all possible counters, and is used to simplify expressions when generating coverage mapping. There are a few problems with this: 1. Keeping the vector as a member is wasteful, since we clear it every time we use it. 2. Most expressions refer to a subset of the counters, so we end up iterating over a large number of zeros doing nothing a lot of the time. This updates the user of the vector to store the terms locally, and uses a sort and combine approach so that we only operate on counters that are actually used in a given expression. For small cases this makes very little difference, but in cases with a very large number of counted regions this is a significant performance fix. llvm-svn: 218879
* llvm-cov: Use the number of executed functions for the function coverage metric.Alex Lorenz2014-09-301-1/+3
| | | | | | | | This commit fixes llvm-cov's function coverage metric by using the number of executed functions instead of the number of fully covered functions. Differential Revision: http://reviews.llvm.org/D5196 llvm-svn: 218672
* llvm-cov: Combine segments that cover the same locationJustin Bogner2014-09-251-4/+18
| | | | | | | | If we have multiple coverage counts for the same segment, we need to add them up rather than arbitrarily choosing one. This fixes that and adds a test with template instantiations to exercise it. llvm-svn: 218432
* llvm-cov: Allow creating CoverageMappings from filenamesJustin Bogner2014-09-201-0/+14
| | | | llvm-svn: 218185
* llvm-cov: Disentangle the coverage data logic from the display (NFC)Justin Bogner2014-09-201-0/+275
| | | | | | | | | | This splits the logic for actually looking up coverage information from the logic that displays it. These were tangled rather thoroughly so this change is a bit large, but it mostly consists of moving things around. The coverage lookup logic itself now lives in the library, rather than being spread between the library and the tool. llvm-svn: 218184
* llvm-cov: Try to appease MSVC after r217404Justin Bogner2014-09-081-2/+2
| | | | llvm-svn: 217406
* llvm-cov: Use ErrorOr rather than an error_code* (NFC)Justin Bogner2014-09-081-24/+17
| | | | llvm-svn: 217404
* Coverage: fix the missing output stream in recursive call to ↵Alex Lorenz2014-07-291-2/+2
| | | | | | CoverageMappingContext::dump llvm-svn: 214206
* Add code coverage mapping data, reader, and writer.Alex Lorenz2014-07-241-0/+149
This patch implements the data structures, the reader and the writers for the new code coverage mapping system. The new code coverage mapping system uses the instrumentation based profiling to provide code coverage analysis. llvm-svn: 213910
OpenPOWER on IntegriCloud