summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-07-11 01:23:29 +0000
committerVedant Kumar <vsk@apple.com>2017-07-11 01:23:29 +0000
commit7fa75105807608b34d59ed44f63eef994129622f (patch)
tree72001c10a87d20135ef756a11b29721ff99d1d55 /llvm/test
parent5a22d3fd11475e853b3a2af93f79bce8f534d0ef (diff)
downloadbcm5719-llvm-7fa75105807608b34d59ed44f63eef994129622f.tar.gz
bcm5719-llvm-7fa75105807608b34d59ed44f63eef994129622f.zip
[llvm-cov] Add a cl::opt to control the number of threads
When an output directory is specified, llvm-cov spawns some threads to speed up the process of writing out file reports. Add an option which allows users to control how many threads llvm-cov uses. A CommandGuide.rst update + test is included. llvm-svn: 307609
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/tools/llvm-cov/threads.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cov/threads.c b/llvm/test/tools/llvm-cov/threads.c
new file mode 100644
index 00000000000..00a85edb7ce
--- /dev/null
+++ b/llvm/test/tools/llvm-cov/threads.c
@@ -0,0 +1,11 @@
+// Coverage/profile data recycled from the showLineExecutionCounts.cpp test.
+//
+// RUN: llvm-profdata merge %S/Inputs/lineExecutionCounts.proftext -o %t.profdata
+// RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -j 1 -o %t1.dir -instr-profile %t.profdata -filename-equivalence %S/showLineExecutionCounts.cpp
+// RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -num-threads 2 -o %t2.dir -instr-profile %t.profdata -filename-equivalence %S/showLineExecutionCounts.cpp
+// RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -o %t3.dir -instr-profile %t.profdata -filename-equivalence %S/showLineExecutionCounts.cpp
+//
+// RUN: diff %t1.dir/index.txt %t2.dir/index.txt
+// RUN: diff %t1.dir/coverage/tmp/showLineExecutionCounts.cpp.txt %t2.dir/coverage/tmp/showLineExecutionCounts.cpp.txt
+// RUN: diff %t1.dir/index.txt %t3.dir/index.txt
+// RUN: diff %t1.dir/coverage/tmp/showLineExecutionCounts.cpp.txt %t3.dir/coverage/tmp/showLineExecutionCounts.cpp.txt
OpenPOWER on IntegriCloud