[all-commits] [llvm/llvm-project] 2492b5: [profile] Support online merging with continuous s...

Vedant Kumar via All-commits all-commits at lists.llvm.org
Mon Nov 18 12:57:05 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2492b5a12550f7c4bb428c3761392f2ce47fa269
      https://github.com/llvm/llvm-project/commit/2492b5a12550f7c4bb428c3761392f2ce47fa269
  Author: Vedant Kumar <vsk at apple.com>
  Date:   2019-11-18 (Mon, 18 Nov 2019)

  Changed paths:
    M clang/docs/SourceBasedCodeCoverage.rst
    M compiler-rt/lib/profile/InstrProfilingBuffer.c
    M compiler-rt/lib/profile/InstrProfilingFile.c
    M compiler-rt/lib/profile/InstrProfilingPort.h
    A compiler-rt/test/profile/ContinuousSyncMode/online-merging.c

  Log Message:
  -----------
  [profile] Support online merging with continuous sync mode

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.

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




More information about the All-commits mailing list