llvm-project/llvm/test/tools/llvm-cov/Inputs
Max Moroz cc254ba4a7 [llvm-cov] Multi-threaded implementation of prepareFileReports method.
Summary:
Local testing has demonstrated a great speed improvement, compare the following:

1) Existing version:
```
$ time llvm-cov show -format=html -output-dir=report -instr-profile=... ...
The tool has been launched:                            00:00:00
Loading coverage data:                                 00:00:00
Get unique source files:                               00:00:33
Creating an index out of the source files:             00:00:34
Going into prepareFileReports:                         00:00:34
Going to emit summary information for each file:       00:28:55 <-- 28:21 min!
Going to emit links to files with no function:         00:28:55
Launching 32 threads for generating HTML files:        00:28:55

real  37m43.651s
user  112m5.540s
sys   7m39.872s
```

2) Multi-threaded version with 32 CPUs:
```
$ time llvm-cov show -format=html -output-dir=report -instr-profile=... ...
The tool has been launched:                            00:00:00
Loading coverage data:                                 00:00:00
Get unique source files:                               00:00:38
Creating an index out of the source files:             00:00:40
Going into prepareFileReports:                         00:00:40
Preparing file reports using 32 threads:               00:00:40
# Creating thread tasks for the following number of files: 16422
Going to emit summary information for each file:       00:01:57 <-- 1:17 min!
Going to emit links to files with no function:         00:01:58
Launching 32 threads for generating HTML files:        00:01:58

real  11m2.044s
user  134m48.124s
sys   7m53.388s
```

Reviewers: vsk, morehouse

Reviewed By: vsk

Subscribers: Dor1s, llvm-commits, kcc

Differential Revision: https://reviews.llvm.org/D41206

llvm-svn: 321871
2018-01-05 16:15:07 +00:00
..
multiple_objects [llvm-cov] Avoid over-counting covered lines and regions 2017-09-15 23:00:02 +00:00
multithreaded_report [llvm-cov] Multi-threaded implementation of prepareFileReports method. 2018-01-05 16:15:07 +00:00
sources_specified [llvm-cov] Reland sources-specified.test with addition of "-path-equivalence". 2017-10-13 17:27:39 +00:00
README
binary-formats.canonical.json [llvm-cov] Do not print out the filename of the object file 2016-10-25 00:08:33 +00:00
binary-formats.macho32b
binary-formats.macho32l
binary-formats.macho64l
binary-formats.proftext
binary-formats.v1.linux64l
binary-formats.v2.linux32l Reapply (2x) "[PGO] Fix name encoding for ObjC-like functions" 2016-03-28 21:06:42 +00:00
binary-formats.v2.linux64l Reapply (2x) "[PGO] Fix name encoding for ObjC-like functions" 2016-03-28 21:06:42 +00:00
combine_expansions.covmapping [Coverage] Ensure that coverage mapping data has an expected alignment in 'covmapping' files. 2016-05-18 07:43:27 +00:00
combine_expansions.proftext [Coverage] Combine counts of expansion regions if there are no code regions for the same area. 2016-05-05 09:39:45 +00:00
copy_block_helper.gcda
copy_block_helper.gcno
deferred-regions.covmapping [llvm-cov] Fix more -path-equivalence test bugs 2017-11-09 02:50:24 +00:00
deferred-regions.profdata [llvm-cov] Remove workaround in line execution count calculation (PR34962) 2017-10-16 23:47:10 +00:00
dir-with-filtering.covmapping [llvm-cov] Create directory structure when filtering using -name*= options 2017-09-28 10:07:30 +00:00
dir-with-filtering.proftext [llvm-cov] Create directory structure when filtering using -name*= options 2017-09-28 10:07:30 +00:00
dir-with-filtering1.cpp [llvm-cov] Create directory structure when filtering using -name*= options 2017-09-28 10:07:30 +00:00
dir-with-filtering2.cpp [llvm-cov] Create directory structure when filtering using -name*= options 2017-09-28 10:07:30 +00:00
double_dots.covmapping [llvm-cov] Disable PGO name compression in a test file 2016-06-29 16:34:57 +00:00
double_dots.proftext [llvm-cov] Do not allow ".." to escape the coverage sub-directory 2016-06-29 16:22:12 +00:00
elf_binary_comdat.profdata Reapply (2x) "[PGO] Fix name encoding for ObjC-like functions" 2016-03-28 21:06:42 +00:00
gcov47_compatibility.gcda
gcov47_compatibility.gcno
hideUnexecutedSubviews.proftext [llvm-cov] Track function and instantiation coverage separately 2016-09-19 00:38:23 +00:00
highlightedRanges.covmapping [Coverage] Use the wrapped segment when a line has entry segments 2017-11-09 02:33:43 +00:00
highlightedRanges.json [Coverage] Use the wrapped segment when a line has entry segments 2017-11-09 02:33:43 +00:00
highlightedRanges.profdata
ifdef.covmapping [llvm-cov] Don't attach exec counts to lines which start a skipped region 2017-09-11 21:31:32 +00:00
ifdef.profdata [llvm-cov] Don't attach exec counts to lines which start a skipped region 2017-09-11 21:31:32 +00:00
instrprof-comdat.h [Coverage] Use the wrapped segment when a line has entry segments 2017-11-09 02:33:43 +00:00
lineExecutionCounts.covmapping [Coverage] Use the wrapped segment when a line has entry segments 2017-11-09 02:33:43 +00:00
lineExecutionCounts.json [llvm-cov] Make report metrics agree with line exec counts, fixes PR34615 2017-09-19 02:00:12 +00:00
lineExecutionCounts.proftext
malformedRegions.covmapping [Coverage] Report errors when reading malformed source regions 2017-09-08 18:44:47 +00:00
multiple-files.covmapping [llvm-cov] Disable zlib compression in a test input, unbreaks bots 2016-09-08 01:19:29 +00:00
multiple-files.proftext [llvm-cov] Drop the longest common filename prefix from summaries 2016-09-08 00:56:43 +00:00
multiple-files2.covmapping [llvm-cov] Strip redundant path components from filenames (fix PR31982) 2017-02-23 22:20:32 +00:00
name_whitelist.covmapping [llvm-cov] Read in function names for filtering from a text file. 2017-08-31 09:11:31 +00:00
name_whitelist.cpp [llvm-cov] Read in function names for filtering from a text file. 2017-08-31 09:11:31 +00:00
name_whitelist.proftext [llvm-cov] Read in function names for filtering from a text file. 2017-08-31 09:11:31 +00:00
native_separators.covmapping [llvm-cov] Use the native path in the coverage report. 2016-08-30 07:01:37 +00:00
path_equivalence.covmapping [llvm-cov] Add an option which maps the location of source directories on another machine to your local copies 2017-08-14 10:20:12 +00:00
path_equivalence.proftext [llvm-cov] Add an option which maps the location of source directories on another machine to your local copies 2017-08-14 10:20:12 +00:00
prefer_used_to_unused.covmapping [llvm-cov] Fix more -path-equivalence test bugs 2017-11-09 02:50:24 +00:00
prefer_used_to_unused.cpp [Coverage] Fix an issue where improper coverage mapping data could be loaded for an inline function. 2016-05-20 09:14:24 +00:00
prefer_used_to_unused.proftext [Coverage] Fix an issue where improper coverage mapping data could be loaded for an inline function. 2016-05-20 09:14:24 +00:00
prevent_false_instantiations.covmapping [Coverage] Ensure that coverage mapping data has an expected alignment in 'covmapping' files. 2016-05-18 07:43:27 +00:00
prevent_false_instantiations.cpp Reapply "[Coverage] Prevent detection of false instantiations in case of macro expansion." 2016-04-18 15:36:30 +00:00
prevent_false_instantiations.proftext Reapply "[Coverage] Prevent detection of false instantiations in case of macro expansion." 2016-04-18 15:36:30 +00:00
range_based_for.gcda
range_based_for.gcno
regionMarkers.covmapping [Coverage] Use the wrapped segment when a line has entry segments 2017-11-09 02:33:43 +00:00
regionMarkers.json [Coverage] Use the wrapped segment when a line has entry segments 2017-11-09 02:33:43 +00:00
regionMarkers.proftext
report.covmapping [Coverage] Use the wrapped segment when a line has entry segments 2017-11-09 02:33:43 +00:00
report.profdata
showExpansions.covmapping [Coverage] Ensure that coverage mapping data has an expected alignment in 'covmapping' files. 2016-05-18 07:43:27 +00:00
showExpansions.json [llvm-cov] Make report metrics agree with line exec counts, fixes PR34615 2017-09-19 02:00:12 +00:00
showExpansions.profdata
showProjectSummary.covmapping [llvm-cov] Add the project summary to each source file coverage report. 2016-08-24 14:27:23 +00:00
showProjectSummary.proftext [llvm-cov] Add the project summary to each source file coverage report. 2016-08-24 14:27:23 +00:00
showProjectSummary.test [llvm-cov] Do not print out the filename of the object file 2016-10-25 00:08:33 +00:00
showTabsHTML.covmapping [LLVM-COV]Replace tabs to the space indentations in the HTML coverage report. 2016-08-04 10:39:43 +00:00
showTabsHTML.proftext [LLVM-COV]Replace tabs to the space indentations in the HTML coverage report. 2016-08-04 10:39:43 +00:00
templateInstantiations.covmapping [Coverage] Use the wrapped segment when a line has entry segments 2017-11-09 02:33:43 +00:00
templateInstantiations.profdata
test.cpp
test.gcda
test.gcno
test.h
test_-a.cpp.gcov
test_-a.h.gcov
test_-a_-b.cpp.gcov
test_-a_-b.h.gcov
test_-a_-b_-c_-u.cpp.gcov
test_-a_-b_-c_-u.h.gcov
test_-a_-b_-u.cpp.gcov
test_-a_-b_-u.h.gcov
test_-b.output [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
test_-b_-f.output
test_-f.output [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
test_exit_block_arcs.gcda
test_exit_block_arcs.gcno
test_file_checksum_fail.gcda
test_func_checksum_fail.gcda
test_long_file_names.output [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
test_long_paths.output [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
test_missing.cpp.gcov
test_missing.h.gcov
test_missing.output [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
test_no_gcda.cpp.gcov
test_no_gcda.h.gcov
test_no_gcda.output [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
test_no_options.cpp.gcov
test_no_options.h.gcov
test_no_options.output [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
test_no_output.output [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
test_no_preserve_paths.output [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
test_objdir.cpp.gcov
test_objdir.h.gcov
test_paths.cpp.gcov
test_paths.gcda
test_paths.gcno
test_paths.h.gcov
test_preserve_paths.output [gcov] Sort file info before printing it 2017-04-26 00:16:10 +00:00
test_read_fail.gcno
universal-binary
universal-binary.json [llvm-cov] Do not print out the filename of the object file 2016-10-25 00:08:33 +00:00
universal-binary.proftext
whitelist1.txt [llvm-cov] Read in function names for filtering from a text file. 2017-08-31 09:11:31 +00:00
whitelist2.txt [llvm-cov] Read in function names for filtering from a text file. 2017-08-31 09:11:31 +00:00
zeroFunctionFile.covmapping [llvm-cov] Avoid 0% when reporting something that's 0/0 2016-11-21 14:00:04 +00:00
zeroFunctionFile.h [llvm-cov] Avoid 0% when reporting something that's 0/0 2016-11-21 14:00:04 +00:00
zeroFunctionFile.proftext [llvm-cov] Avoid 0% when reporting something that's 0/0 2016-11-21 14:00:04 +00:00

README

These inputs were pre-generated to allow for easier testing of llvm-cov.

The files used to test the gcov compatible code coverage tool were generated
using the following method:

  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