summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-cov] Avoid 0% when reporting something that's 0/0Alex Lorenz2016-11-214-0/+38
| | | | | | | | | | | | | 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
* [llvm-cov] Turn line numbers in html reports into clickable linksVedant Kumar2016-11-022-55/+55
| | | | llvm-svn: 285853
* [llvm-cov] Add support for loading coverage from multiple objectsVedant Kumar2016-10-252-1/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D25086 llvm-svn: 285088
* [llvm-cov] Do not print out the filename of the object fileVedant Kumar2016-10-258-15/+14
| | | | | | | | | 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
* [llvm-cov] Filter away source files that aren't in the coverage mappingVedant Kumar2016-09-231-1/+2
| | | | | | | | ... 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-231-4/+14
| | | | | | | | | | | | | | 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] Add the ability to specify directories of input source filesVedant Kumar2016-09-221-0/+9
| | | | | | | | | 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/+7
| | | | llvm-svn: 282020
* [llvm-cov] Delete the NonCodeLines field, it was always deadVedant Kumar2016-09-196-18/+18
| | | | llvm-svn: 281882
* [llvm-cov] Teach the coverage exporter about instantiation coverageVedant Kumar2016-09-196-0/+6
| | | | | | | While we're at it, re-use the logic from CoverageReport to compute summaries. llvm-svn: 281877
* [llvm-cov] Track function and instantiation coverage separatelyVedant Kumar2016-09-194-9/+28
| | | | | | | | | | | | | | | | | | | | 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] Drop another redundant 'No.' suffixVedant Kumar2016-09-191-1/+1
| | | | llvm-svn: 281872
* [llvm-cov] Hide instantiation views for unexecuted functionsVedant Kumar2016-09-152-0/+26
| | | | | | | | 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-0/+4
| | | | | | | Doing so is pointless, since the whole view is usually visible in a small amount of space. llvm-svn: 281588
* [llvm-cov] Don't print a verbose title when looking at one fileVedant Kumar2016-09-151-2/+2
| | | | | | | Having the same title, timestamp, etc. occur repeatedly creates an unnecessary distraction when paging through a report. llvm-svn: 281579
* [llvm-cov] Fix tests that aren't checking anything (NFC)Vedant Kumar2016-09-153-28/+24
| | | | | | | E.g the 'showProjectSummary' test contains some checks which can't fail because they match themselves... llvm-svn: 281578
* [llvm-cov] Just emit the version number in the index fileVedant Kumar2016-09-131-6/+6
| | | | | | | 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-131-7/+11
| | | | | | | | | | 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-101-6/+5
| | | | | | | 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-104-20/+12
| | | | | | | - Change the location of the 'Region Coverage' column. - Use less css and text for some labels. llvm-svn: 281145
* [llvm-cov] Try to fix the native_separators.c test some moreVedant Kumar2016-09-091-1/+1
| | | | | | | | | | | | | It's still breaking this bot (though, it looks like it always had been): http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015 This time, add quotes around llvm-{cov,config} so that lit won't expand them. Thanks to Reid for suggesting the patch! llvm-svn: 281072
* [llvm-cov] Emit a summary in the report directory's indexVedant Kumar2016-09-092-7/+29
| | | | | | | | 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] Speculate fix for a Windows-only test (NFC)Vedant Kumar2016-09-091-4/+2
| | | | | | | | | | | | This test should have broken after r280896. Fix up the test case speculatively, since I don't have a way to test it. I wonder why I didn't get any angry bot emails about this. Maybe none of the win32 bots test llvm-cov? That could explain it, since the test says it 'REQUIRES: system-windows', which is restricted to win32 hosts. Also: why is 'system-windows' not defined for non-win32 Windows bots? llvm-svn: 281008
* [llvm-cov] Fix issues with segment highlighting in the html viewVedant Kumar2016-09-082-14/+14
| | | | | | | | | | | | | 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] Disable zlib compression in a test input, unbreaks botsVedant Kumar2016-09-081-0/+0
| | | | | | | | | | Disable name compression in the inputs used to produce multiple-files.covmapping. Should fix bots which don't compile with zlib: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/19610/steps/test/logs/stdio llvm-svn: 280898
* [llvm-cov] Use less space to describe source namesVedant Kumar2016-09-082-10/+7
| | | | | | | | 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-083-0/+28
| | | | | | | Remove the longest common prefix from filenames when printing coverage summaries. This makes them easier to compare. llvm-svn: 280895
* [llvm-cov] Add the project summary to the text coverage report for each ↵Ying Yi2016-09-062-3/+8
| | | | | | | | | | 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-062-2/+9
| | | | | | | | 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
* [llvm-cov] Use the native path in the coverage report.Ying Yi2016-08-303-0/+23
| | | | | | | | | | | The coverage reports contain the source or binary file paths. On Windows, the file path might contain the seperators of both '/' and '\'. This patch uses the native path in the coverage reports. For example, on Windows, all '/' are converted to '\'. Differential Revision: https://reviews.llvm.org/D23922 llvm-svn: 280061
* [llvm-cov] Add the project summary to each source file coverage report.Ying Yi2016-08-244-4/+60
| | | | | | | | | | | | This patch includes the following changes: - Included header "Code coverage report" and include the date that the report was created. - Included title (as specified in a command line option, (i.e llvm-cov -project-title="Simple Test") - In the summary, list the elf files that the source code file has contributed to. - Used column heading for "Line No.", "Count No.", Source". Differential Revision: https://reviews.llvm.org/D23345 llvm-svn: 279628
* [llvm-cov] Swapped the line and count columns.Ying Yi2016-08-097-140/+140
| | | | | | | | | In the coverage report, the line and count columns have been swapped to make it more readable. A follow-up commit in compiler-rt is needed Differential Revision: https://reviews.llvm.org/D23281 llvm-svn: 278152
* [LLVM-COV]Replace tabs to the space indentations in the HTML coverage report.Ying Yi2016-08-043-0/+24
| | | | | | | | | | | When using orbis-llvm-cov.exe to generate the HTML report, the HTML report can look quite different to the source file if it includes tabs.The default tab size is 2 spaces instead of 8 spaces. A command line switch is be added to set the tab size. Differential Revision: https://reviews.llvm.org/D23087 llvm-svn: 277715
* [llvm-cov] Add a debug mode for source range highlighting (in html)Vedant Kumar2016-07-271-18/+19
| | | | | | | llvm-cov's `-dump' option now emits information which helps debug source range highlighting in html mode. llvm-svn: 276924
* [llvm-cov] Escape '\' in strings when emitting JSONVedant Kumar2016-07-271-1/+3
| | | | | | | Test that Windows path separators are escaped properly. Add a round-trip test to verify the JSON produced by the exporter. llvm-svn: 276832
* Retry: [llvm-cov] Add support for exporting coverage data to JSONVedant Kumar2016-07-2612-0/+266
| | | | | | | | | | | | | | | | | | | | | | | | This enables users to export coverage information as portable JSON for use by analysis tools and storage in document based databases. The export sub-command is invoked just like the others: llvm-cov export -instr-profile path/to/foo.profdata path/to/foo.binary The resulting JSON contains a list of files and functions. Every file object contains a list of segments, expansions, and a summary of the file's region, function, and line coverage. Every function object contains the function's name and regions. There is also a total summary for the entire object file. Changes since the initial commit (r276813): - Fixed the regexes in the tests to handle Windows filepaths. Patch by Eddie Hurtig! Differential Revision: https://reviews.llvm.org/D22651 llvm-svn: 276818
* Revert "[llvm-cov] Add support for exporting coverage data to JSON"Vedant Kumar2016-07-2612-267/+0
| | | | | | | | | This reverts commit r276813. The Windows bots are complaining about some of the filename regexes in the tests: http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/5299 llvm-svn: 276816
* [llvm-cov] Add support for exporting coverage data to JSONVedant Kumar2016-07-2612-0/+267
| | | | | | | | | | | | | | | | | | | | This enables users to export coverage information as portable JSON for use by analysis tools and storage in document based databases. The export sub-command is invoked just like the others: llvm-cov export -instr-profile path/to/foo.profdata path/to/foo.binary The resulting JSON contains a list of files and functions. Every file object contains a list of segments, expansions, and a summary of the file's region, function, and line coverage. Every function object contains the function's name and regions. There is also a total summary for the entire object file. Patch by Eddie Hurtig! Differential Revision: https://reviews.llvm.org/D22651 llvm-svn: 276813
* [llvm-cov] Don't copy stylesheets into index filesVedant Kumar2016-07-221-5/+6
| | | | | | Just link in the stylesheet from the toplevel dir of the report. llvm-svn: 276468
* [llvm-cov] - Add the coverage of lines in the summary report.Ying Yi2016-07-222-4/+4
| | | | | | | | | | The llvm-cov ‘report' command displays a summary of the coverage of a binary file. The summary report currently only includes covered regions and covered functions. This patch adds the coverage of lines in the summary report. Differential Revision: https://reviews.llvm.org/D22569 llvm-svn: 276409
* [llvm-cov] - Improve llvm-cov error messageYing Yi2016-07-221-0/+3
| | | | | | | | | | | | | | | | | | | Summary: When giving the following command: % llvm-cov report -instr-profile=default.profraw llvm-cov will give the following error message: >llvm-cov report: Not enough positional command line arguments specified! >Must specify at least 1 positional arguments: See: orbis-llvm-cov report -help This patch changes the error message from '1 positional arguments' to '1 positional argument'. Differential Revision: https://reviews.llvm.org/D22621 llvm-svn: 276404
* [llvm-cov] Strengthen a test caseVedant Kumar2016-07-211-0/+13
| | | | | | Check that stylesheets work when we're not using -output-dir. llvm-svn: 276363
* [llvm-cov] Use relative paths to the stylesheet (for html reports)Vedant Kumar2016-07-211-0/+22
| | | | | | | | | | This makes it easy to swap out the default stylesheet for a custom one. It also shaves ~6.62 MB out of the report directory for a full coverage build of llvm+clang. While we're at it, prune the CSS and add tests for it. llvm-svn: 276359
* [llvm-cov] Place anchors around line numbers in html reportsVedant Kumar2016-07-182-55/+55
| | | | | | Based on a suggestion by Harlan Haskins! llvm-svn: 275840
* [llvm-cov] Attempt to fix a test failure on WindowsVedant Kumar2016-07-181-2/+2
| | | | | | | | | | | | | | | Don't make the test/tools/llvm-cov/demangle.test depend on the order in which symbols are seen, or on the exact formatting llvm-cov emits after a symbol is printed. This is an attempt to fix a Windows bot failure: http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/9141 I don't know what the root cause of the failure is, or why the showTemplateInstantiations test doesn't fail in the same way on the Windows bots. However, this measure can't hurt, and it'll at least get me on the blamelists again. llvm-svn: 275758
* [llvm-cov] Optionally use a symbol demangler when preparing reportsVedant Kumar2016-07-151-0/+4
| | | | | | | | | | Add an option to specify a symbol demangler (as well as options to the demangler). This can be used to make reports more human-readable. This option is especially useful in -output-dir mode, since it isn't as easy to manually pipe reports into a demangler in this mode. llvm-svn: 275640
* [llvm-cov] Relax a test for WindowsVedant Kumar2016-07-151-1/+1
| | | | | | | | Attempt to address this bot failure: http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/4967 llvm-svn: 275522
* [llvm-cov] Improve error messagesVedant Kumar2016-07-151-0/+5
| | | | | | | While we're at it, extend an existing test to make sure that error messages look reasonable. llvm-svn: 275520
* [llvm-cov] Add support for creating html reportsVedant Kumar2016-07-062-0/+76
| | | | | | | | Based on a patch by Harlan Haskins! Differential Revision: http://reviews.llvm.org/D18278 llvm-svn: 274688
OpenPOWER on IntegriCloud