summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2016-03-28 22:15:15 +0000
committerAdam Nemet <anemet@apple.com>2016-03-28 22:15:15 +0000
commit9734583a92f283effb532869d6681394f0ba34df (patch)
tree639e1e67c82104caa0c8e2843c28f485a9d8e062 /llvm/include
parent3e9664fd604f8e8ff47f52c22ee490c819e137a8 (diff)
downloadbcm5719-llvm-9734583a92f283effb532869d6681394f0ba34df.tar.gz
bcm5719-llvm-9734583a92f283effb532869d6681394f0ba34df.zip
[PGO] More comments how function pointers for indirect calls are mapped
to function names Summary: Hopefully this will make it easier for the next person to figure all this out... Reviewers: bogner, davidxl Subscribers: davidxl, cfe-commits Differential Revision: http://reviews.llvm.org/D18489 llvm-svn: 264678
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/ProfileData/InstrProfData.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/include/llvm/ProfileData/InstrProfData.inc b/llvm/include/llvm/ProfileData/InstrProfData.inc
index c4a70529289..b092c3bbe66 100644
--- a/llvm/include/llvm/ProfileData/InstrProfData.inc
+++ b/llvm/include/llvm/ProfileData/InstrProfData.inc
@@ -133,6 +133,15 @@ VALUE_PROF_FUNC_PARAM(uint32_t, CounterIndex, Type::getInt32Ty(Ctx))
#else
#define INSTR_PROF_DATA_DEFINED
#endif
+/* For indirect function call value profiling, the addresses of the target
+ * functions are profiled by the instrumented code. The target addresses are
+ * written in the raw profile data and converted to target function name's MD5
+ * hash by the profile reader during deserialization. Typically, this happens
+ * when the the raw profile data is read during profile merging.
+ *
+ * For this remapping the ProfData is used. ProfData contains both the function
+ * name hash and the function address.
+ */
VALUE_PROF_KIND(IPVK_IndirectCallTarget, 0)
/* These two kinds must be the last to be
* declared. This is to make sure the string
OpenPOWER on IntegriCloud