diff options
author | Alex Lorenz <arphaman@gmail.com> | 2014-08-22 22:56:03 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2014-08-22 22:56:03 +0000 |
commit | e82d89cc37ceb69bcb35b911e2ca2119aa51a5e5 (patch) | |
tree | e00c23666c05940403bf9e156614ec16d3c11815 /llvm/test/tools/llvm-cov/Inputs | |
parent | ec33fa9aca4dc1baaeffcd8876fb385e1f8cb86e (diff) | |
download | bcm5719-llvm-e82d89cc37ceb69bcb35b911e2ca2119aa51a5e5.tar.gz bcm5719-llvm-e82d89cc37ceb69bcb35b911e2ca2119aa51a5e5.zip |
llvm-cov: add code coverage tool that's based on coverage mapping format and 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
Diffstat (limited to 'llvm/test/tools/llvm-cov/Inputs')
-rw-r--r-- | llvm/test/tools/llvm-cov/Inputs/README | 22 | ||||
-rw-r--r-- | llvm/test/tools/llvm-cov/Inputs/highlightedRanges.covmapping | bin | 0 -> 355 bytes | |||
-rw-r--r-- | llvm/test/tools/llvm-cov/Inputs/highlightedRanges.profdata | bin | 0 -> 848 bytes | |||
-rw-r--r-- | llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.covmapping | bin | 0 -> 194 bytes | |||
-rw-r--r-- | llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.profdata | bin | 0 -> 656 bytes | |||
-rw-r--r-- | llvm/test/tools/llvm-cov/Inputs/regionMarkers.covmapping | bin | 0 -> 194 bytes | |||
-rw-r--r-- | llvm/test/tools/llvm-cov/Inputs/regionMarkers.profdata | bin | 0 -> 656 bytes |
7 files changed, 18 insertions, 4 deletions
diff --git a/llvm/test/tools/llvm-cov/Inputs/README b/llvm/test/tools/llvm-cov/Inputs/README index 2cfb1917965..3773ba3f5e6 100644 --- a/llvm/test/tools/llvm-cov/Inputs/README +++ b/llvm/test/tools/llvm-cov/Inputs/README @@ -1,7 +1,21 @@ These inputs were pre-generated to allow for easier testing of llvm-cov. -test.gcno and test.gcda were create by running clang: - clang++ -g -ftest-coverage -fprofile-arcs test.cpp +The files used to test the gcov compatible code coverage tool were generated +using the following method: -test.cpp.gcov was created by running gcov 4.2.1: - gcov test.cpp + test.gcno and test.gcda were create by running clang: + clang++ -g -ftest-coverage -fprofile-arcs test.cpp + + test.cpp.gcov was created by running gcov 4.2.1: + gcov test.cpp + +The 'covmapping' files that are used to test llvm-cov contain raw sections +with the coverage mapping data generated by the compiler and linker. They are +created by running clang and llvm-cov: + clang++ -fprofile-instr-generate -fcoverage-mapping -o test test.cpp + llvm-cov convert-for-testing -o test.covmapping test + +The 'profdata' files were generated by running an instrumented version of the +program and merging the raw profile data using llvm-profdata. + ./test + llvm-profdata merge -o test.profdata default.profraw diff --git a/llvm/test/tools/llvm-cov/Inputs/highlightedRanges.covmapping b/llvm/test/tools/llvm-cov/Inputs/highlightedRanges.covmapping Binary files differnew file mode 100644 index 00000000000..20eb0d7e8df --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/highlightedRanges.covmapping diff --git a/llvm/test/tools/llvm-cov/Inputs/highlightedRanges.profdata b/llvm/test/tools/llvm-cov/Inputs/highlightedRanges.profdata Binary files differnew file mode 100644 index 00000000000..b465b000b03 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/highlightedRanges.profdata diff --git a/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.covmapping b/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.covmapping Binary files differnew file mode 100644 index 00000000000..5cfa1694da2 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.covmapping diff --git a/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.profdata b/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.profdata Binary files differnew file mode 100644 index 00000000000..87122272396 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.profdata diff --git a/llvm/test/tools/llvm-cov/Inputs/regionMarkers.covmapping b/llvm/test/tools/llvm-cov/Inputs/regionMarkers.covmapping Binary files differnew file mode 100644 index 00000000000..3ebcb0777af --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/regionMarkers.covmapping diff --git a/llvm/test/tools/llvm-cov/Inputs/regionMarkers.profdata b/llvm/test/tools/llvm-cov/Inputs/regionMarkers.profdata Binary files differnew file mode 100644 index 00000000000..87122272396 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/regionMarkers.profdata |