[PATCH] D18489: [PGO, clang] Comment how function pointers for indirect calls are mapped to function names

Adam Nemet via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 28 15:20:30 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL264678: [PGO] More comments how function pointers for indirect calls are mapped (authored by anemet).

Changed prior to commit:
  http://reviews.llvm.org/D18489?vs=51713&id=51845#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D18489

Files:
  llvm/trunk/include/llvm/ProfileData/InstrProfData.inc

Index: llvm/trunk/include/llvm/ProfileData/InstrProfData.inc
===================================================================
--- llvm/trunk/include/llvm/ProfileData/InstrProfData.inc
+++ llvm/trunk/include/llvm/ProfileData/InstrProfData.inc
@@ -133,6 +133,15 @@
 #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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18489.51845.patch
Type: text/x-patch
Size: 959 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160328/0194d31e/attachment.bin>


More information about the cfe-commits mailing list