[PATCH] D59277: Speeding up llvm-cov with multithreaded renderFiles.

Sajjad Mirza via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 17:10:04 PDT 2019


sajjadm added inline comments.


================
Comment at: llvm/tools/llvm-cov/CoverageExporterJson.cpp:158
+    NumThreads = std::max(1U, std::min(llvm::heavyweight_hardware_concurrency(),
+                                       unsigned(SourceFiles.size())));
+  }
----------------
vsk wrote:
> Can the parallelism be controlled by -num-threads/-j, similar to: https://llvm.org/docs/CommandGuide/llvm-cov.html#cmdoption-llvm-cov-show-num-threads
> 
> This will help write a test that the output from e.g. `-j 4` matches the output from `-j 1`.
Yes, this code respects -num-threads. There's actually a test that already does the check you're describing: [[ https://github.com/llvm/llvm-project/blob/master/llvm/test/tools/llvm-cov/multithreaded-report.test | multithreaded-report.test ]].


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59277/new/

https://reviews.llvm.org/D59277





More information about the llvm-commits mailing list