[PATCH] D20459: [profile] Add support for static counter allocation for value profiling (part-1)

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 21:14:26 PDT 2016


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

Current value profiler implementation relies on libc runtime for lazy allocation of profile counters. While this is flexible, it limits the usability greatly for apps running in restricted runtime environment.

With this change, VP will now have counters allocated statically by default. Dynamic allocation is still supported which is controlled by compile time option.

The implementation chooses allocate only one node per-site. Tested with instrumented clang (compiing a large C++ source) -- the total number of values collected at runtime is a still quite smaller than statically allocated # of counters .



http://reviews.llvm.org/D20459

Files:
  include/llvm/ProfileData/InstrProf.h
  include/llvm/ProfileData/InstrProfData.inc
  include/llvm/Transforms/InstrProfiling.h
  lib/Transforms/Instrumentation/InstrProfiling.cpp
  test/Instrumentation/InstrProfiling/icall.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20459.57886.patch
Type: text/x-patch
Size: 10929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160520/22d21362/attachment.bin>


More information about the llvm-commits mailing list