[PATCH] D119494: [CSSPGO] Do not recount callee samples when computing profile summary for nested CS profile.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 10 15:27:54 PST 2022


hoy created this revision.
Herald added subscribers: modimo, wenlei, hiraditya.
hoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When generating nested CS profile with all calling contexts of a function duplicated into a base profile under `--generate-merged-base-profiles`, do not recount callee samples when computing profile summary.

This fixes the profile summary mismatch between flat cs profile and nested cs profile, for extbinary format. Unfortunately there is no way to identify context duplication for nested text profile. The profile summary computed on the fly will diverge from the extbinary counter part.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119494

Files:
  llvm/lib/ProfileData/ProfileSummaryBuilder.cpp
  llvm/lib/ProfileData/SampleProf.cpp
  llvm/test/tools/llvm-profdata/cs-sample-nested-profile.test
  llvm/tools/llvm-profdata/llvm-profdata.cpp
  llvm/tools/llvm-profgen/ProfileGenerator.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119494.407704.patch
Type: text/x-patch
Size: 6175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220210/15b4cce7/attachment.bin>


More information about the llvm-commits mailing list