[PATCH] D20651: [profile] pre-allocate a small counter set in profile runtime

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 16:36:53 PDT 2016


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

vp-counters-per-site tunings for small apps generally works (for SPEC), but gobmk is an outlier. It has ~40 sites with ~800 values collected.  Bumping up per-site ratio to 20x can be too excessive for general cases.  Here a very low overhead solution is to pre-allocate  a shared pool which works well.

I can make it work in a way such that the overhead is only paid with value profiling is on and when dynamic allocation is off. However given that the overhead (24k bytes) is tiny, I would rather avoid it.

http://reviews.llvm.org/D20651

Files:
  lib/profile/InstrProfilingValue.c
  test/profile/Inputs/instrprof-value-prof-real.c
  test/profile/instrprof-value-prof.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20651.58538.patch
Type: text/x-patch
Size: 4758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160525/c0e68c97/attachment.bin>


More information about the llvm-commits mailing list