1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/tools/llvm-cov/Inputs
Max Moroz 7d614bdaf0 [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
multithreaded_report
sources_specified
binary-formats.canonical.json
binary-formats.macho32b
binary-formats.macho32l
binary-formats.macho64l
binary-formats.proftext
binary-formats.v1.linux64l
binary-formats.v2.linux32l
binary-formats.v2.linux64l
combine_expansions.covmapping
combine_expansions.proftext
copy_block_helper.gcda
copy_block_helper.gcno
deferred-regions.covmapping
deferred-regions.profdata
dir-with-filtering1.cpp
dir-with-filtering2.cpp
dir-with-filtering.covmapping
dir-with-filtering.proftext
double_dots.covmapping
double_dots.proftext
elf_binary_comdat.profdata
gcov47_compatibility.gcda
gcov47_compatibility.gcno
hideUnexecutedSubviews.proftext
highlightedRanges.covmapping
highlightedRanges.json
highlightedRanges.profdata
ifdef.covmapping
ifdef.profdata
instrprof-comdat.h
lineExecutionCounts.covmapping
lineExecutionCounts.json
lineExecutionCounts.proftext
malformedRegions.covmapping
multiple-files2.covmapping
multiple-files.covmapping
multiple-files.proftext
name_whitelist.covmapping
name_whitelist.cpp
name_whitelist.proftext
native_separators.covmapping
path_equivalence.covmapping
path_equivalence.proftext
prefer_used_to_unused.covmapping
prefer_used_to_unused.cpp
prefer_used_to_unused.proftext
prevent_false_instantiations.covmapping
prevent_false_instantiations.cpp
prevent_false_instantiations.proftext
range_based_for.gcda
range_based_for.gcno
README
regionMarkers.covmapping
regionMarkers.json
regionMarkers.proftext
report.covmapping
report.profdata
showExpansions.covmapping
showExpansions.json
showExpansions.profdata
showProjectSummary.covmapping
showProjectSummary.proftext
showProjectSummary.test
showTabsHTML.covmapping
showTabsHTML.proftext
templateInstantiations.covmapping
templateInstantiations.profdata
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_-a_-b.cpp.gcov
test_-a_-b.h.gcov
test_-a.cpp.gcov
test_-a.h.gcov
test_-b_-f.output
test_-b.output
test_-f.output
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
test_long_paths.output
test_missing.cpp.gcov
test_missing.h.gcov
test_missing.output
test_no_gcda.cpp.gcov
test_no_gcda.h.gcov
test_no_gcda.output
test_no_options.cpp.gcov
test_no_options.h.gcov
test_no_options.output
test_no_output.output
test_no_preserve_paths.output
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
test_read_fail.gcno
test.cpp
test.gcda
test.gcno
test.h
universal-binary
universal-binary.json
universal-binary.proftext
whitelist1.txt
whitelist2.txt
zeroFunctionFile.covmapping
zeroFunctionFile.h
zeroFunctionFile.proftext

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