summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov
Commit message (Collapse)AuthorAgeFilesLines
...
* Apply clang-tidy's 'performance-faster-string-find' check to LLVM.Benjamin Kramer2016-11-301-1/+1
| | | | | | No functionality change intended. llvm-svn: 288235
* [llvm-cov] Avoid 0% when reporting something that's 0/0Alex Lorenz2016-11-212-20/+36
| | | | | | | | | | | | | This commit makes llvm-cov avoid showing 0% (0/0) coverage for things like file function coverage, etc. in reports and HTML output. This can happen for files like headers that have macros but no functions. This commit makes llvm-cov report - (0/0) instead. rdar://29246480 Differential Revision: https://reviews.llvm.org/D26615 llvm-svn: 287539
* Fix spelling mistakes in Tools/Tests comments. NFC.Simon Pilgrim2016-11-201-1/+1
| | | | | | Identified by Pedro Giffuni in PR27636. llvm-svn: 287489
* [llvm-cov] Turn line numbers in html reports into clickable linksVedant Kumar2016-11-021-3/+5
| | | | llvm-svn: 285853
* Remove duplicated default move ctors/move assign. No functional change.Benjamin Kramer2016-10-271-9/+0
| | | | llvm-svn: 285302
* [llvm-cov] Don't use colored output until we know it's supportedVedant Kumar2016-10-251-2/+2
| | | | | | | | | CodeCoverageTool::error() depends on CoverageViewOptions::Colors being initialized. Should fix: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/56 llvm-svn: 285103
* [llvm-cov] Add support for loading coverage from multiple objectsVedant Kumar2016-10-251-9/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D25086 llvm-svn: 285088
* [llvm-cov] Do not print out the filename of the object fileVedant Kumar2016-10-257-41/+11
| | | | | | | | | When we load coverage data from multiple objects, we don't have a way to attribute a source object to a function record. Printing out the object filename next to the source filename is already not very useful: soon, it'll actually become misleading. Stop printing out the filename now. llvm-svn: 285043
* Remove TimeValue usage from llvm/SupportPavel Labath2016-10-241-1/+2
| | | | | | | | | | | | | | | | | Summary: This is a follow-up to D25416. It removes all usages of TimeValue from llvm/Support library (except for the actual TimeValue declaration), and replaces them with appropriate usages of std::chrono. To facilitate this, I have added small utility functions for converting time points and durations into appropriate OS-specific types (FILETIME, struct timespec, ...). Reviewers: zturner, mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25730 llvm-svn: 284966
* [llvm-cov] Don't spawn a thread unless ThreadCount > 1Vedant Kumar2016-10-191-27/+39
| | | | | | | | | | | | Initializing a ThreadPool with ThreadCount = 1 spawns a thread even though we don't need to. This is at least slower than it needs to be, and at worst may somehow be exacerbating PR30735 (llvm-cov times out on ARM bots). As a follow-up, I'll try to add logic to llvm::ThreadPool to avoid spawning a thread when ThreadCount = 1. llvm-svn: 284621
* [Coverage] Delete some copy constructors (NFC)Vedant Kumar2016-10-121-1/+1
| | | | llvm-svn: 284064
* Turn cl::values() (for enum) from a vararg function to using C++ variadic ↵Mehdi Amini2016-10-081-2/+1
| | | | | | | | | | | | | | | template The core of the change is supposed to be NFC, however it also fixes what I believe was an undefined behavior when calling: va_start(ValueArgs, Desc); with Desc being a StringRef. Differential Revision: https://reviews.llvm.org/D25342 llvm-svn: 283671
* [llvm-cov] Silence a warning from the MSVC runtime (NFC)Vedant Kumar2016-09-261-4/+6
| | | | | | | | | | | | | | | | | | | Rework getLongestCommonPrefixLen() so that it doesn't access string null terminators. The old version with std::mismatch would do this: | v Strings[0] = ['a', nil] Strings[1] = ['a', 'a', nil] ^ | This should silence a warning from the MSVC runtime (PR30515). As before, I tested this out by preparing a coverage report for FileCheck. Thanks to Yaron Keren for the report! llvm-svn: 282422
* [llvm-cov] Factor out logic to remove unmapped inputs (NFC)Vedant Kumar2016-09-231-5/+13
| | | | llvm-svn: 282286
* [llvm-cov] Filter away source files that aren't in the coverage mappingVedant Kumar2016-09-231-3/+19
| | | | | | | | ... so that they don't show up in the index. This came up because polly contains a .git directory and some other unmapped input in its source dir. llvm-svn: 282282
* [llvm-cov] Get rid of all invalid filename referencesVedant Kumar2016-09-239-29/+29
| | | | | | | | | | | | | | We used to append filenames into a vector of std::string, and then append a reference to each string into a separate vector. This made it easier to work with the getUniqueSourceFiles API. But it's buggy. std::string has a small-string optimization, so you can't expect to capture a reference to one if you're copying it into a growing vector. Add a test that triggers this invalid reference to std::string scenario, and kill the issue with fire by just using ArrayRef<std::string> everywhere. llvm-svn: 282281
* [llvm-cov] Minor cleanup. NFC.Vedant Kumar2016-09-231-6/+6
| | | | llvm-svn: 282280
* [llvm-cov] Document some fields in a class (NFC)Vedant Kumar2016-09-221-4/+15
| | | | llvm-svn: 282203
* [llvm-cov] Add the ability to specify directories of input source filesVedant Kumar2016-09-221-10/+56
| | | | | | | | | We've supported restricting coverage reports to a set of files for a long time. Add support for being able to restrict by entire directories. I suppose this supersedes D20803. llvm-svn: 282202
* [llvm-cov] Demangle names for hidden instantiation viewsVedant Kumar2016-09-201-3/+4
| | | | llvm-svn: 282020
* [llvm-cov] Emit a link to some documentationVedant Kumar2016-09-191-0/+7
| | | | llvm-svn: 281883
* [llvm-cov] Delete the NonCodeLines field, it was always deadVedant Kumar2016-09-193-24/+8
| | | | llvm-svn: 281882
* [llvm-cov] Teach the coverage exporter about instantiation coverageVedant Kumar2016-09-191-16/+26
| | | | | | | While we're at it, re-use the logic from CoverageReport to compute summaries. llvm-svn: 281877
* [llvm-cov] Make a helper method static for re-use (NFC)Vedant Kumar2016-09-193-8/+9
| | | | llvm-svn: 281876
* [llvm-cov] Track function and instantiation coverage separatelyVedant Kumar2016-09-194-10/+67
| | | | | | | | | | | | | | | | | | | | These are distinct statistics which are useful to look at separately. Example: say you have a template function "foo" with 5 instantiations and only 3 of them are covered. Then this contributes (1/1) to the total function coverage and (3/5) to the total instantiation coverage. I.e, the old "Function Coverage" column has been renamed to "Instantiation Coverage", and the new "Function Coverage" aggregates information from the various instantiations of a function. One benefit of making this switch is that the Line and Region coverage columns will start making sense. Let's continue the example and assume that the 5 instantiations of "foo" cover {2, 4, 6, 8, 10} out of 10 lines respectively. The new line coverage for "foo" is (10/10), not (30/50). The old scenario got confusing because we'd report that there were more lines in a file than what was actually possible. llvm-svn: 281875
* [llvm-cov] Don't recompute the 'Covered' field from *CoverageInfo (NFC)Vedant Kumar2016-09-191-6/+5
| | | | llvm-svn: 281874
* [llvm-cov] Make 'adjustColumnWidths' do less workVedant Kumar2016-09-191-12/+23
| | | | | | | | | | | | This drops some redundant calls to get{UniqueSourceFiles, CoveredFunctions}. We can figure out the right column widths without re-doing this expensive work. This isn't NFC, but I don't want to check in another binary *.covmapping file with long filenames in it. I tested this locally on a project with some long filenames (FileCheck). llvm-svn: 281873
* [llvm-cov] Drop another redundant 'No.' suffixVedant Kumar2016-09-191-1/+1
| | | | llvm-svn: 281872
* [llvm-cov] Move some layout logic to the right spot (NFC)Vedant Kumar2016-09-152-2/+3
| | | | llvm-svn: 281590
* [llvm-cov] Hide instantiation views for unexecuted functionsVedant Kumar2016-09-153-16/+31
| | | | | | | | Copying in the full text of the function doesn't help at all when we already know that it's never executed. Just say that it's unexecuted -- the relevant source text has already been printed. llvm-svn: 281589
* [llvm-cov] Don't create 'jump to ...' links in nested viewsVedant Kumar2016-09-151-1/+1
| | | | | | | Doing so is pointless, since the whole view is usually visible in a small amount of space. llvm-svn: 281588
* [llvm-cov] Make a method name more accurate (NFC)Vedant Kumar2016-09-156-12/+10
| | | | llvm-svn: 281581
* [llvm-cov] Don't print a verbose title when looking at one fileVedant Kumar2016-09-151-1/+1
| | | | | | | Having the same title, timestamp, etc. occur repeatedly creates an unnecessary distraction when paging through a report. llvm-svn: 281579
* [llvm-cov] Just emit the version number in the index fileVedant Kumar2016-09-132-6/+2
| | | | | | | Having the version information in every view is distracting, especially if there are several sub-views. llvm-svn: 281414
* [llvm-cov] - Included footer "Generated by llvm-cov -- llvm version <version ↵Ying Yi2016-09-133-3/+18
| | | | | | | | | | number>" in the coverage report. The llvm-cov version information will be useful to the user when comparing the code coverage across different versions of llvm-cov. This patch provides the llvm-cov version information in the generated coverage report. Differential Revision: https://reviews.llvm.org/D24457 llvm-svn: 281321
* [llvm-cov] Move the 'jump to first unexecuted line' linkVedant Kumar2016-09-106-33/+31
| | | | | | | Having it in the same row as the source name is jarring. Move it next to the "Source" column label. llvm-svn: 281146
* [llvm-cov] Minor visual tweaks for html reportsVedant Kumar2016-09-102-56/+23
| | | | | | | - Change the location of the 'Region Coverage' column. - Use less css and text for some labels. llvm-svn: 281145
* [llvm-cov] Remove some asserts in the html renderer (NFC)Vedant Kumar2016-09-091-5/+1
| | | | | | | | | | | These asserts are making tests fragile. The renderer does not enter an invalid state when they fail, however, it may spit out a garbled coverage report because the source text no longer matches the provided coverage mapping. Another follow-up to r281072. llvm-svn: 281076
* [llvm-cov] Handle native paths correctly in the text indexVedant Kumar2016-09-091-1/+5
| | | | | | | | | | Treat filenames the same way in the text index as we do in the html index. This is a follow-up to r281008 (an attempt to unbreak the native_separators.c test on Windows). Patch by Maggie Yi! llvm-svn: 281062
* [llvm-cov] Emit a summary in the report directory's indexVedant Kumar2016-09-096-28/+125
| | | | | | | | llvm-cov writes out an index file in '-output-dir' mode, albeit not a very informative one. Try to fix that by using the CoverageReport API to include some basic summary information in the index file. llvm-svn: 281011
* [llvm-cov] Constify some methods (NFC)Vedant Kumar2016-09-092-4/+5
| | | | llvm-svn: 281010
* [llvm-cov] Add an API to prepare file reports (NFC)Vedant Kumar2016-09-092-20/+47
| | | | | | | | It would be nice to prepare file reports (using the CoverageReport API) without actually rendering them to the console. I plan on using this to flesh out the 'index' files in the coverage views. llvm-svn: 281009
* [llvm-cov] Fix issues with segment highlighting in the html viewVedant Kumar2016-09-081-16/+10
| | | | | | | | | | | | | The text and html coverage views take different approaches to emitting highlighted regions. That's because this problem is easier in the text view: there's no need to worry about escaping text or adding tooltip content to a highlighted snippet. Unfortunately, the html view didn't get region highlighting quite right. This patch fixes the situation, bringing parity between the two views. llvm-svn: 280981
* [llvm-cov] Use less space to describe source namesVedant Kumar2016-09-087-42/+33
| | | | | | | | In r279628, we made SourceCoverageView list the binary associated with a view and started adding labels (e.g "Source: foo" or "Function: bar") to everything. Condense this information a bit to unclutter reports. llvm-svn: 280896
* [llvm-cov] Drop the longest common filename prefix from summariesVedant Kumar2016-09-081-2/+20
| | | | | | | Remove the longest common prefix from filenames when printing coverage summaries. This makes them easier to compare. llvm-svn: 280895
* [llvm-cov] Use colors consistently in the summaryVedant Kumar2016-09-061-32/+32
| | | | | | | | Use the same color for counts and percentages. There doesn't seem to be a reason for them to be different, and the summary looks more consistent this way. llvm-svn: 280765
* [llvm-cov] Clean up the summary class, delete dead code (NFC)Vedant Kumar2016-09-063-59/+59
| | | | llvm-svn: 280764
* [llvm-cov] Add the project summary to the text coverage report for each ↵Ying Yi2016-09-065-9/+16
| | | | | | | | | | source file. This patch is a spin-off from https://reviews.llvm.org/D23922. It extends the text view to preserve the same feature as the html view. Differential Revision: https://reviews.llvm.org/D24241 llvm-svn: 280756
* [llvm-cov] Add the "Go to first unexecuted line" feature.Ying Yi2016-09-066-8/+47
| | | | | | | | This patch provides easy navigation to find the zero count lines, especially useful when the source file is very large. Differential Revision: https://reviews.llvm.org/D23277 llvm-svn: 280739
* [llvm-cov] Drop redundant "No." suffix in a column titleVedant Kumar2016-08-311-1/+1
| | | | llvm-svn: 280181
OpenPOWER on IntegriCloud