[PATCH] D69586: [profile] Support online merging with continuous sync mode

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 15:05:44 PDT 2019


vsk created this revision.
vsk added reviewers: davidxl, phosek, sajjadm, ejvaughan.
Herald added a project: LLVM.

Make it possible to use online profile merging ("%m" mode) with
continuous sync ("%c" mode).

To implement this, the merged profile is locked in the runtime
initialization step and either a) filled out for the first time or b)
checked for compatibility. Then, the profile can simply be mmap()'d with
MAP_SHARED set. With the mmap() in place, counter updates from every
process which uses an image are mapped onto the same set of physical
pages assigned by the filesystem cache. After the mmap() is set up, the
profile is unlocked.

Depends on https://reviews.llvm.org/D68351.


https://reviews.llvm.org/D69586

Files:
  compiler-rt/lib/profile/InstrProfilingFile.c
  compiler-rt/lib/profile/InstrProfilingPort.h
  compiler-rt/test/profile/ContinuousSyncMode/online-merging.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69586.226976.patch
Type: text/x-patch
Size: 16020 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191029/a3d876da/attachment.bin>


More information about the llvm-commits mailing list