[llvm] [llvm-profgen] Add --sample-period to estimate absolute counts (PR #99826)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 15:45:15 PDT 2024
WenleiHe wrote:
> This is useful because the effective LBR depth can vary by platform and even across samples in the same profile.
But when processing profile, we know the exact depth of each LBR sample?
> Without applying the sampling period first, Count will typically be smaller than Sample->LBRStack.size() - 1 and the result won't be useful.
Ok, I see why you want to multiple the count with something first. In this case, the multiplier doesn't have to be sampling period, instead it just needs to be something bigger than max LBR depth? It's sort of like a normalizing factor.. So I think we can get away with something simpler than actual sample period -- like we don't want to suggest that user need to provide the actual sampling period.
https://github.com/llvm/llvm-project/pull/99826
More information about the llvm-commits
mailing list