[PATCH] D15057: [PGO] Enable common VP format in profile runtime

David Li via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 29 10:04:00 PST 2015


davidxl created this revision.
davidxl added a reviewer: betulb.
davidxl added a subscriber: llvm-commits.

In this patch, the following changes are done
1) Enable emission of VP data in ValueProfData format using common API (now made available through InstrProfData.inc)

2) Removed the update of TotalValueDataSize
  - this reduced the number of atomtic operations (slow with high latency) executed during profile update 
  - allows MIPS arch to enable value profiling -- which lacks the syn fetch-add support
  - Using TotalValueDataSize also has a fundamental problem that it always penalize the last function that gets profile collected -- if new values were added after buffer is created, last function's existing vp data (can be hot) may get dropped.
  - With the new approach in the patch, only the new values for any function are dropped (if any).

3) Added an extensive value profiling mock test. The test declares > 100 dummy caller functions and synthesize up to 128 value profile sites for each caller. Up to 8 values are added to each value site using profiler runtime VP interfaces.

http://reviews.llvm.org/D15057

Files:
  lib/profile/InstrProfiling.c
  test/profile/instrprof-value-prof.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15057.41352.patch
Type: text/x-patch
Size: 11933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151129/a27f9c92/attachment.bin>


More information about the llvm-commits mailing list