]> granicus.if.org Git - llvm/commit
[llvm-cov] Don't spawn a thread unless ThreadCount > 1
authorVedant Kumar <vsk@apple.com>
Wed, 19 Oct 2016 17:55:44 +0000 (17:55 +0000)
committerVedant Kumar <vsk@apple.com>
Wed, 19 Oct 2016 17:55:44 +0000 (17:55 +0000)
commit4c50ebb18ba3e0e2d4726c15186980aeb55cf3b4
tree2b03195a4a23cb7863716331077edea840706297
parent735fbf86f3c68b5aa514f19d8fc537735b97d957
[llvm-cov] Don't spawn a thread unless ThreadCount > 1

Initializing a ThreadPool with ThreadCount = 1 spawns a thread even
though we don't need to. This is at least slower than it needs to be,
and at worst may somehow be exacerbating PR30735 (llvm-cov times out
on ARM bots).

As a follow-up, I'll try to add logic to llvm::ThreadPool to avoid
spawning a thread when ThreadCount = 1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284621 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-cov/CodeCoverage.cpp