1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 14:33:02 +02:00
llvm-mirror/lib/ProfileData
Vedant Kumar 78dfceef4b Retry: [llvm-profdata] Speed up merging by using a thread pool
Add a "-j" option to llvm-profdata to control the number of threads used.
Auto-detect NumThreads when it isn't specified, and avoid spawning threads when
they wouldn't be beneficial.

I tested this patch using a raw profile produced by clang (147MB). Here is the
time taken to merge 4 copies together on my laptop:

  No thread pool: 112.87s user 5.92s system 97% cpu 2:01.08 total
  With 2 threads: 134.99s user 26.54s system 164% cpu 1:33.31 total

Changes since the initial commit:

  - When handling odd-length inputs, call ThreadPool::wait() before merging the
    last profile. Should fix a race/off-by-one (see r275937).

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

llvm-svn: 275938
2016-07-19 01:17:20 +00:00
..
Coverage [Coverage] Mark a few more methods const (NFC) 2016-07-15 01:19:33 +00:00
CMakeLists.txt Move ProfileSummary to IR. 2016-05-19 21:07:12 +00:00
InstrProf.cpp [PGO] Don't include full file path in static function profile counter names 2016-07-12 17:14:51 +00:00
InstrProfReader.cpp [ProfileData] Clean up string handling a bit. 2016-05-29 10:31:00 +00:00
InstrProfWriter.cpp Retry: [llvm-profdata] Speed up merging by using a thread pool 2016-07-19 01:17:20 +00:00
LLVMBuild.txt Move coverage related code into a separate library. 2016-04-29 18:53:05 +00:00
ProfileSummaryBuilder.cpp [ProfData] Remove global constructor from ProfileSummaryBuilder. 2016-05-27 17:38:16 +00:00
SampleProf.cpp Add FIXMEs to all derived classes of std::error_category. 2016-05-24 20:13:46 +00:00
SampleProfReader.cpp [ProfileData] Clean up string handling a bit. 2016-05-29 10:31:00 +00:00
SampleProfWriter.cpp [ProfileData] Thread unique_ptr through the summary builder to avoid leaks. 2016-05-20 09:18:37 +00:00