[PATCH] D21056: [profile] in-process profile merging support Part-3

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 22:44:10 PDT 2016


davidxl created this revision.
davidxl added reviewers: vsk, silvas.
davidxl added a subscriber: llvm-commits.

With this patch, the merging feature will be fully functional.

There are two way to turn on profile merging: command line and environment variable. They both share the same mechanism %[0-9]m specifiler in the name pattern.  The numeric modifier in the %m specifier specifies the size of the shared profile file pool size. By default %m is equivalent to %1m which means all processes from the same binary share one single profile file.

Example. Do an instrumented clang build with option -fprofile-instr-generate=/tmp/clang_raw_profile_%m  and run clang test or do a clang bootstrap, all instrumented binaries such as clang, opt, llc, llvm-profdata etc will dump profile data into its own profile data file.

Running instrumented binary with LLVM_PROFILE_FILE=..._%m will have the same effect.




http://reviews.llvm.org/D21056

Files:
  lib/profile/InstrProfilingFile.c
  lib/profile/InstrProfilingInternal.h
  lib/profile/InstrProfilingMerge.c
  lib/profile/InstrProfilingPort.h
  test/profile/instrprof-basic.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21056.59826.patch
Type: text/x-patch
Size: 13212 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160607/2ec7370c/attachment.bin>


More information about the llvm-commits mailing list