summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData/CoverageMappingReader.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Object] Modify OwningBinary's interface to separate inspection from ownership.Lang Hames2014-10-311-1/+1
| | | | | | | | The getBinary and getBuffer method now return ordinary pointers of appropriate const-ness. Ownership is transferred by calling takeBinary(), which returns a pair of the Binary and a MemoryBuffer. llvm-svn: 221003
* Reduce double set lookups. NFC.Benjamin Kramer2014-10-101-2/+2
| | | | llvm-svn: 219505
* Remove bogus std::error_code returns form SectionRef.Rafael Espindola2014-10-081-1/+2
| | | | | | | | | | | | | | There are two methods in SectionRef that can fail: * getName: The index into the string table can be invalid. * getContents: The section might point to invalid contents. Every other method will always succeed and returning and std::error_code just complicates the code. For example, a section can have an invalid alignment, but if we are able to get to the section structure at all and create a SectionRef, we will always be able to read that invalid alignment. llvm-svn: 219314
* llvm-cov: Move some reader debug output out of the tool.Justin Bogner2014-09-201-0/+15
| | | | | | | This debug output is really for testing CoverageMappingReader, not the llvm-cov tool. Move it to where it can be more useful. llvm-svn: 218183
* llvm-cov: add code coverage tool that's based on coverage mapping format and ↵Alex Lorenz2014-08-221-26/+71
| | | | | | | | | | | | | clang's pgo. This commit expands llvm-cov's functionality by adding support for a new code coverage tool that uses LLVM's coverage mapping format and clang's instrumentation based profiling. The gcov compatible tool can be invoked by supplying the 'gcov' command as the first argument, or by modifying the tool's name to end with 'gcov'. Differential Revision: http://reviews.llvm.org/D4445 llvm-svn: 216300
* Coverage Mapping: add function's hash to coverage function records.Alex Lorenz2014-08-211-2/+4
| | | | | | | | | | The profile data format was recently updated and the new indexing api requires the code coverage tool to know the function's hash as well as the function's name to get the execution counts for a function. Differential Revision: http://reviews.llvm.org/D4994 llvm-svn: 216207
* Don't own the buffer in object::Binary.Rafael Espindola2014-08-191-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries (like Archive) and we had to create dummy buffers just to handle that. It is also a bad fit for IRObjectFile where the Module wants to own the buffer too. Keeping this ownership would make supporting IR inside native objects particularly painful. This patch focuses in lib/Object. If something elsewhere used to own an Binary, now it also owns a MemoryBuffer. This patch introduces a few new types. * MemoryBufferRef. This is just a pair of StringRefs for the data and name. This is to MemoryBuffer as StringRef is to std::string. * OwningBinary. A combination of Binary and a MemoryBuffer. This is needed for convenience functions that take a filename and return both the buffer and the Binary using that buffer. The C api now uses OwningBinary to avoid any change in semantics. I will start a new thread to see if we want to change it and how. llvm-svn: 216002
* Coverage: add HasCodeBefore flag to a mapping region.Alex Lorenz2014-08-041-6/+10
| | | | | | | | | This flag will be used by the coverage tool to help compute the execution counts for each line in a source file. Differential Revision: http://reviews.llvm.org/D4746 llvm-svn: 214740
* Use std::unique_ptr to make the ownership explicit.Rafael Espindola2014-07-311-2/+2
| | | | llvm-svn: 214377
* Coverage: improve efficiency of the counter propagation to the expansion ↵Alex Lorenz2014-07-291-8/+12
| | | | | | | | | regions. This patch reduces the complexity of the two inner loops in order to speed up the loading of coverage data for very large functions. llvm-svn: 214228
* coverage: remove empty mapping regionsAlex Lorenz2014-07-251-3/+0
| | | | | | | | This patch removes the empty coverage mapping regions. Those regions were produced by clang's old mapping region generation algorithm, but the new algorithm doesn't generate them. llvm-svn: 213981
* Fix a warning in CoverageMappingReader.cppEhsan Akhgari2014-07-251-1/+1
| | | | llvm-svn: 213920
* Add code coverage mapping data, reader, and writer.Alex Lorenz2014-07-241-0/+482
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