[all-commits] [llvm/llvm-project] 484a56: [llvm-profgen] Fix total samples related issues
ictwanglei via All-commits
all-commits at lists.llvm.org
Wed Dec 8 12:34:09 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 484a569eea7ba294d84b9a700e6fcc2f97626320
https://github.com/llvm/llvm-project/commit/484a569eea7ba294d84b9a700e6fcc2f97626320
Author: wlei <wlei at fb.com>
Date: 2021-12-08 (Wed, 08 Dec 2021)
Changed paths:
M llvm/test/tools/llvm-profgen/cold-profile-trimming.test
M llvm/test/tools/llvm-profgen/coroutine.test
M llvm/test/tools/llvm-profgen/cs-interrupt.test
M llvm/test/tools/llvm-profgen/cs-preinline.test
M llvm/test/tools/llvm-profgen/fname-canonicalization.test
M llvm/test/tools/llvm-profgen/fs-discriminator.test
M llvm/test/tools/llvm-profgen/func-split.test
M llvm/test/tools/llvm-profgen/inline-cs-noprobe.test
M llvm/test/tools/llvm-profgen/inline-force-dwarf.test
M llvm/test/tools/llvm-profgen/inline-noprobe.test
M llvm/test/tools/llvm-profgen/inline-noprobe2.test
M llvm/test/tools/llvm-profgen/multi-load-segs.test
M llvm/test/tools/llvm-profgen/noinline-cs-noprobe.test
M llvm/test/tools/llvm-profgen/noinline-noprobe.test
M llvm/test/tools/llvm-profgen/profile-density.test
M llvm/test/tools/llvm-profgen/recursion-compression-noprobe.test
M llvm/tools/llvm-profgen/ProfileGenerator.cpp
M llvm/tools/llvm-profgen/ProfileGenerator.h
M llvm/tools/llvm-profgen/ProfiledBinary.cpp
M llvm/tools/llvm-profgen/ProfiledBinary.h
Log Message:
-----------
[llvm-profgen] Fix total samples related issues
Since total sample and body sample are used to compute hotness threshold in compiler, we found in some services changing the total samples computation will cause noticeable regression. Hence, here we will revert the changes and just keep all total samples number identical to the old tool.
Three changes in this diff:
1. Revert previous diff(https://reviews.llvm.org/D112672: [llvm-profgen] Update total samples by accumulating all its body samples) and put it under a switch.
2. Keep the negative line number. Although compiler doesn't consume the count but it will be used to compute hot threshold.
3. Change to accumulate total samples per byte instead of per instruction.
Reviewed By: hoy, wenlei
Differential Revision: https://reviews.llvm.org/D115013
More information about the All-commits
mailing list