diff options
author | Vedant Kumar <vsk@apple.com> | 2016-07-18 22:02:39 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2016-07-18 22:02:39 +0000 |
commit | 0bd990758184c47d006f0f4dbc0ab9ac74c39100 (patch) | |
tree | 7a2d132f5441ea0af839cfd721b80705995fd5da /llvm/docs/CommandGuide/llvm-profdata.rst | |
parent | 9f97dcb01869090f9dcafab2924e471a30fc80af (diff) | |
download | bcm5719-llvm-0bd990758184c47d006f0f4dbc0ab9ac74c39100.tar.gz bcm5719-llvm-0bd990758184c47d006f0f4dbc0ab9ac74c39100.zip |
[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
Differential Revision: https://reviews.llvm.org/D22438
llvm-svn: 275921
Diffstat (limited to 'llvm/docs/CommandGuide/llvm-profdata.rst')
-rw-r--r-- | llvm/docs/CommandGuide/llvm-profdata.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/docs/CommandGuide/llvm-profdata.rst b/llvm/docs/CommandGuide/llvm-profdata.rst index f5508b5b2b8..bae0ff7d4ce 100644 --- a/llvm/docs/CommandGuide/llvm-profdata.rst +++ b/llvm/docs/CommandGuide/llvm-profdata.rst @@ -106,6 +106,11 @@ OPTIONS conjunction with -instr. Defaults to false, since it can inhibit compiler optimization during PGO. +.. option:: -num-threads=N, -j=N + + Use N threads to perform profile merging. When N=0, llvm-profdata auto-detects + an appropriate number of threads to use. This is the default. + EXAMPLES ^^^^^^^^ Basic Usage |