Speeding up llvm-cov export with multithreaded renderFiles implementation.
authorMax Moroz <mmoroz@chromium.org>
Thu, 14 Mar 2019 17:49:27 +0000 (17:49 +0000)
committerMax Moroz <mmoroz@chromium.org>
Thu, 14 Mar 2019 17:49:27 +0000 (17:49 +0000)
commita80d9ce5cfa1d109b895cd4837d0c1bb564775d7
treead1d817a44bc97824e2839cc1056a6029c83491b
parent0d8df9832846c1fa0fc83282cdac78f2c01e31b2
Speeding up llvm-cov export with multithreaded renderFiles implementation.

Summary:
CoverageExporterJson::renderFiles accounts for most of the execution time given a large profdata file with multiple binaries.

Proposed solution is to generate JSON for each file in parallel and sort at the end to preserve deterministic output. Also added flags to skip generating parts of the output to trim the output size.

Patch by Sajjad Mirza (@sajjadm).

Reviewers: Dor1s, vsk

Reviewed By: Dor1s, vsk

Subscribers: liaoyuke, mgrang, jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 356178
llvm/docs/CommandGuide/llvm-cov.rst
llvm/test/tools/llvm-cov/export_functions.test [new file with mode: 0644]
llvm/test/tools/llvm-cov/showExpansions.cpp
llvm/tools/llvm-cov/CodeCoverage.cpp
llvm/tools/llvm-cov/CoverageExporterJson.cpp
llvm/tools/llvm-cov/CoverageViewOptions.h