summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov
Commit message (Collapse)AuthorAgeFilesLines
...
* InstrProf: Teach llvm-cov to show the max count instead of the lastJustin Bogner2015-02-231-2/+2
| | | | | | | | | | | | When multiple regions start on the same line, llvm-cov was just showing the count of the last one as the line count. This can be confusing and misleading for things like one-liner loops, where the count at the end isn't very interesting, or even "if" statements with an opening brace at the end of the line. Instead, use the maximum of all of the region start counts. llvm-svn: 230263
* llvm-cov: Actually use the command line arguments when reportingJustin Bogner2015-02-142-3/+17
| | | | | | | | This code didn't really make sense as is. If a filename is passed in, the user obviously wants the coverage *for that file*, not *for everything*. llvm-svn: 229217
* InstrProf: Remove CoverageMapping::HasCodeBefore, it isn't usedJustin Bogner2015-02-034-6/+6
| | | | | | | It's not entirely clear to me what this field was meant for, but it's always false. Remove it. llvm-svn: 228034
* Revert r218673 'llvm-cov: add test for report's function & file association.'Alex Lorenz2014-09-304-32/+0
| | | | | | Test causes buildbot failures. llvm-svn: 218676
* llvm-cov: add test for report's function & file association.Alex Lorenz2014-09-304-0/+32
| | | | | | | | This commit adds a test which checks that the functions defined in header files will get associated with the header files rather than the source files in the reports. Differential Revision: http://reviews.llvm.org/D5489 llvm-svn: 218673
* llvm-cov: Use the number of executed functions for the function coverage metric.Alex Lorenz2014-09-303-0/+24
| | | | | | | | 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-253-0/+43
| | | | | | | | 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: Prevent a test from matching its own check linesJustin Bogner2014-09-192-5/+3
| | | | | | | Since llvm-cov shows the source file in its output, be careful about potentially matching the check lines themselves. llvm-svn: 218138
* llvm-cov: Fix dropped lines when filters were appliedJustin Bogner2014-09-192-1/+6
| | | | | | | Uncovered lines in the middle of a covered region weren't being shown when filtering to a particular function. llvm-svn: 218109
* llvm-cov: Push some more debug output into the View (NFC)Justin Bogner2014-09-171-3/+3
| | | | llvm-svn: 217984
* Exclude known and bugzilled failures from UBSan bootstrapAlexey Samsonov2014-09-171-0/+4
| | | | llvm-svn: 217979
* llvm-cov: Make debug output more consistentJustin Bogner2014-09-152-2/+2
| | | | | | | | This changes the debug output of the llvm-cov tool to consistently write to stderr, and moves the highlighting output closer to where it's relevant. llvm-svn: 217838
* llvm-cov: Fix an issue with showing regions but not countsJustin Bogner2014-09-151-1/+1
| | | | | | | | | | | In r217746, though it was supposed to be NFC, I broke llvm-cov's handling of showing regions without showing counts. This should've shown up in the existing tests, except they were checking debug output that was displayed regardless of what was actually output. I've moved the relevant debug output to a more appropriate place so that the tests catch this kind of thing. llvm-svn: 217835
* Revert "llvm-cov: Remove an overly system specific test"Justin Bogner2014-09-112-0/+31
| | | | | | | | | | This fixes a call to sys::fs::equivalent that should've been to CodeCoverageTool::equivalentFiles, which lets us restore the test of r217476 that was removed in r217478. This reverts r217478, but the test works this time. llvm-svn: 217646
* llvm-cov: Remove an overly system specific testJustin Bogner2014-09-101-31/+0
| | | | | | | | | | It appears that the -filename-equivalence option for testing llvm-cov doesn't work correctly with -show-expansions. I'm reverting this test to get the bots green while I look into fixing that. This partially reverts r217476 llvm-svn: 217478
* llvm-cov: Fix a misuse of ArrayRef::slice I introduced in r217430Justin Bogner2014-09-103-0/+31
| | | | | | | It appears this code was completely untested, so using ArrayRef wrong didn't break anything obvious. llvm-svn: 217476
* llvm-cov: test: add xfail for the big-endian buildbotsAlex Lorenz2014-08-233-0/+9
| | | | llvm-svn: 216310
* llvm-cov: add code coverage tool that's based on coverage mapping format and ↵Alex Lorenz2014-08-2210-4/+108
| | | | | | | | | | | | | 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
* llvm-cov: Support specifying multiple source filesJustin Bogner2014-06-271-3/+3
| | | | | | | | | Make llvm-cov compatible with gcov for cases where multiple files are specified on the command line. That is, loop over each one and report coverage, and report errors on stderr only rather than via return code. llvm-svn: 211959
* Do not XFAIL test/tools/llvm-cov tests on powerpc64leUlrich Weigand2014-06-183-3/+3
| | | | | | | | | | | All tests in test/tools/llvm-cov fail on big-endian targets and are supposed to be XFAILed there. However, including "powerpc64" in the XFAIL line is now incorrect, since that matches both powerpc64- and powerpc64le- targets, and the tests pass on the latter. Update the XFAIL lines to use powerpc64- instead (like mips64-). llvm-svn: 211172
* [Test] Trim unnecessary .c and .cpp from config.suffix in lit.local.cfgAdam Nemet2014-05-121-1/+1
| | | | | | | | | | | | | | Tested by comparing make check VERBOSE=1 before and after to make sure no tests are missed. (VERBOSE=1 prints the list of tests.) Only one test :( remains where .cpp is required: tools/llvm-cov/range_based_for.cpp:// RUN: llvm-cov range_based_for.cpp | FileCheck %s --check-prefix=STDOUT The topic was discussed in this thread: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140428/214905.html llvm-svn: 208621
* llvm-cov: Handle missing source files as GCOV doesJustin Bogner2014-05-074-0/+97
| | | | | | | | | | | If the source files referenced by a gcno file are missing, gcov outputs a coverage file where every line is simply /*EOF*/. This also occurs for lines in the coverage that are past the end of a file that is found. This change mimics gcov. llvm-svn: 208149
* llvm-cov: Implement --no-outputJustin Bogner2014-05-072-0/+9
| | | | | | | | In gcov, there's a -n/--no-output option, which disables the writing of any .gcov files, so that it emits only the summary info on stdout. This implements the same behaviour in llvm-cov. llvm-svn: 208148
* llvm-cov: Fix handling of line zero appearing in a line tableJustin Bogner2014-05-024-1/+30
| | | | | | | | | | | | | Reading line tables in llvm-cov was pretty broken, but would happen to work as long as no line in the table was 0. It's not clear to me whether a line of zero *should* show up in these tables, but deciding to read a string in the middle of the line table is certainly the wrong thing to do if it does. I've also added some comments, as trying to figure out what this block of code was doing was fairly unpleasant. llvm-svn: 207866
* llvm-cov: Add support for gcov's --long-file-names optionJustin Bogner2014-04-233-0/+26
| | | | | | | | GCOV provides an option to prepend output file names with the source file name, to disambiguate between covered data that's included from multiple sources. Add a flag to llvm-cov that does the same. llvm-svn: 207035
* llvm-cov: Move XFAIL after the body of the testJustin Bogner2014-03-261-2/+3
| | | | | | | llvm-cov tests are sensitive to line number changes, so putting this at the end will limit churn when we fix the XFAIL. llvm-svn: 204871
* llvm-cov: Disable test on big endian machinesJustin Bogner2014-03-261-0/+2
| | | | llvm-svn: 204868
* llvm-cov: Handle functions with no line numberJustin Bogner2014-03-264-1/+30
| | | | | | | | | Functions may in an instrumented binary but not in the original source when they're inserted by the compiler or the runtime. These functions aren't meaningful to the user, so teach llvm-cov to skip over them instead of crashing. llvm-svn: 204863
* For lcov tests, don't Xfail mips littl endian (mipsel-... and mip64el-...)Reed Kotler2014-02-241-1/+1
| | | | | | targets. Just big endian (mips-... and mips64-...) llvm-svn: 202049
* llvm-cov: Support gcov's extermely lenient treatment of -oJustin Bogner2014-02-181-0/+10
| | | | | | | | | | | | In gcov, the -o flag can accept either a directory or a file name. When given a directory, the gcda and gcno files are expected to be in that directory. When given a file, the gcda and gcno files are expected to be named based on the stem of that file. Non-existent paths are treated as files. This implements compatible behaviour. llvm-svn: 201555
* llvm-cov: Implement the preserve-paths flagJustin Bogner2014-02-0411-4/+119
| | | | | | | | | | | | | | | | Until now, when a path in a gcno file included a directory, we would emit our .gcov file in that directory, whereas gcov always emits the file in the current directory. In doing so, this implements gcov's strange name-mangling -p flag, which is needed to avoid clobbering files when two with the same name exist in different directories. The path mangling is a bit ugly and only handles unix-like paths, but it's simple, and it doesn't make any guesses as to how it should behave outside of what gcov documents. If we decide this should be cross platform later, we can consider the compatibility implications then. llvm-svn: 200754
* llvm-cov: Implement the object-directory flagJustin Bogner2014-02-043-0/+94
| | | | llvm-svn: 200741
* llvm-cov: Ignore missing .gcda filesJustin Bogner2014-02-044-0/+100
| | | | | | | | When gcov is run without gcda data, it acts as if the counts are all zero and labels the file as - to indicate that there was no data. We should do the same. llvm-svn: 200740
* llvm-cov: Document the llvm-cov testsJustin Bogner2014-02-041-9/+31
| | | | llvm-svn: 200739
* llvm-cov: Expect a source file as a positional parameterJustin Bogner2014-01-291-10/+10
| | | | | | | | | | | Currently, llvm-cov isn't command-line compatible with gcov, which accepts a source file name as its first parameter and infers the gcno and gcda file names from that. This change keeps our -gcda and -gcno options available for convenience in overriding this behaviour, but adds the required parameter and inference behaviour as a compatible default. llvm-svn: 200417
* [Sparc] Add sparc to the list of XFAIL architecture. It seems that the ↵Venkatraman Govindaraju2014-01-251-1/+1
| | | | | | llvm-cov test is not supported in big-endian architectures. llvm-svn: 200101
* llvm-cov: Added -f option for function summaries.Yuchen Wu2013-12-193-0/+107
| | | | | | | | | | | Similar to the file summaries, the function summaries output line, branching and call statistics. The file summaries have been moved outside the initial loop so that all of the function summaries can be outputted before file summaries. Also updated test cases. llvm-svn: 197633
* llvm-cov: Print coverage summary to STDOUT.Yuchen Wu2013-12-183-2/+23
| | | | | | | | | | | | File summaries will now be optionally outputted which will give line, branching and call coverage info. Unfortunately, clang's current instrumentation does not give enough information to deduce function calls, something that gcc is able to do. Thus, no calls are always outputted to be consistent with gcov output. Also updated tests. llvm-svn: 197606
* llvm-cov: Added -c option for branch counts.Yuchen Wu2013-12-183-0/+178
| | | | | | | | | This will cause llvm-cov to output branch counts instead of branch probabilities. -b must be enabled. Also updated tests. llvm-svn: 197594
* llvm-cov: Added -u option for unconditional branch info.Yuchen Wu2013-12-163-0/+178
| | | | | | | | | Outputs branch information for unconditional branches in addition to conditional branches. -b option must be enabled. Also updated tests. llvm-svn: 197432
* llvm-cov: Added -b option for branch probabilities.Yuchen Wu2013-12-133-0/+150
| | | | | | | | | | | This option tells llvm-cov to print out branch probabilities when a basic block contains multiple branches. It also prints out some function summary info including the number of times the function enters, the percent of time it returns, and how many blocks were executed. Also updated tests. llvm-svn: 197198
* llvm-cov: Added -a option for block data.Yuchen Wu2013-12-105-2/+127
| | | | | | | | | | | | | | | Similar to gcov, llvm-cov will now print out the block count at the end of each block. Multiple blocks can end on the same line. One computational difference is by using -a, llvm-cov will no longer simply add the block counts together to form a line count. Instead, it will take the maximum of the block counts on that line. This has a similar effect to what gcov does, but generates more correct counts in certain scenarios. Also updated tests. llvm-svn: 196856
* llvm-cov: Added test.h header to tests.Yuchen Wu2013-12-077-80/+86
| | | | llvm-svn: 196632
* llvm-cov: Regenerated gcov files with r195513 changes.Yuchen Wu2013-12-062-0/+0
| | | | llvm-svn: 196609
* llvm-cov: Changed extension from .llcov to .gcov.Yuchen Wu2013-12-052-2/+1
| | | | llvm-svn: 196530
* Un-revert r196358: "llvm-cov: Added support for function checksums."Daniel Jasper2013-12-047-1/+3
| | | | | | And add the proper fix. llvm-svn: 196367
* Revert r196358: "llvm-cov: Added support for function checksums."Daniel Jasper2013-12-047-3/+1
| | | | | | | This currently breaks clang/test/CodeGen/code-coverage.c. The root cause is that the newly introduced access to Funcs[j] is out of bounds. llvm-svn: 196365
* llvm-cov: Added support for function checksums.Yuchen Wu2013-12-047-1/+3
| | | | | | | The function checksums are hashed from the concatenation of the function name and line number. llvm-svn: 196358
* llvm-cov: Another fix to llvm-cov test.Yuchen Wu2013-12-031-1/+1
| | | | | | | Copy all test files to temporary directory, not just test.* files. Tests didn't fail because the missing files occurred in XFAILS. llvm-svn: 196305
* Further fix to llvm-cov test.Daniel Jasper2013-12-031-1/+5
| | | | | | | It turns out that in some build systems, tests are executed in a non-writable directory. Hopefully, this finally fixes the issue. llvm-svn: 196256
OpenPOWER on IntegriCloud