[PATCH] D92998: [CSSPGO][llvm-profgen] Pseudo probe based CS profile generation
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 21 17:52:40 PST 2020
hoy added inline comments.
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:43
+ // Enable context-sensitive functionalities in SampleProf
+ FunctionSamples::ProfileIsCS = true;
if (usePseudoProbes(BinarySampleCounters)) {
----------------
wlei wrote:
> wlei wrote:
> > hoy wrote:
> > > I see. Sounds like the initializations should be moved into `ProfileGenerator::generateProfile` or `ProfileGenerator::write`. What do you think?
> > Sounds good! So since it's only used for the writer, I will move them to `ProfileGenerator::write`
> Just confirm, it's also used in `getEntrySamples`, so `ProfileGenerator::generateProfile` might be the right place.
>
> ```
> uint64_t getEntrySamples() const {
> if (FunctionSamples::ProfileIsCS && getHeadSamples()) {
> // For CS profile, if we already have more accurate head samples
> // counted by branch sample from caller, use them as entry samples.
> return getHeadSamples();
> }
> ```
Yeah, `generateProfile` sounds the right place.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92998/new/
https://reviews.llvm.org/D92998
More information about the llvm-commits
mailing list