[PATCH] D18490: [PGO] Comment how function pointers for indirect calls are mapped to function names
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 14 17:10:38 PDT 2021
davidxl added inline comments.
================
Comment at: llvm/trunk/include/llvm/ProfileData/InstrProfData.inc:78
+// function name hashes during the conversion from raw to merged profile data.
INSTR_PROF_DATA(const IntPtrT, llvm::Type::getInt8PtrTy(Ctx), FunctionPointer, \
FunctionAddr)
----------------
MaskRay wrote:
> MaskRay wrote:
> > Is `FunctionPointer` still used by the runtime? @davidxl @vsk
> >
> > I can only find one reference `__llvm_get_function_addr`, which is a public API.
> Hmm. It is used by `ProfileData/InstrProfReader.cpp`
>
> So it seems that value profiling adds quite a bit size overhead to the metadata sections.
Right -- it is used by the profile reader to build mapping from func->name so that indirect call target profile can be translated to func names. Changing the llvm-profdata workflow by forcing binary as an input will allow the field to be removed -- but things get complicated with -fPIE build.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D18490/new/
https://reviews.llvm.org/D18490
More information about the llvm-commits
mailing list