[PATCH] D147456: [AutoFDO] Stale profile matching(part 1)

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 13:55:21 PDT 2023


davidxl added a comment.

In D147456#4246802 <https://reviews.llvm.org/D147456#4246802>, @wenlei wrote:

> In D147456#4246749 <https://reviews.llvm.org/D147456#4246749>, @davidxl wrote:
>
>> In D147456#4246695 <https://reviews.llvm.org/D147456#4246695>, @hoy wrote:
>>
>>> In D147456#4246648 <https://reviews.llvm.org/D147456#4246648>, @davidxl wrote:
>>>
>>>> 
>>>
>>>
>>>
>>>> By the way, another way is to offline remapping --- basically 'correcting' the stale profile by mapping the old locations to the new locations and produce a refreshed profile.  This is what we plan to do internally.
>>>
>>> This sounds interesting. By offline do you mean the profile generation time? Wondering how to get the new locations without building the new binary.
>>
>> Right -- the source revision information is available for any target in the build environment.
>
> By doing the mapping during profile generation outside of compiler, you would need a new profile for each target source version. That seems less flexible comparing to doing the mapping in the compiler where the mapping is naturally built for the current source being compiled.

In practice, it does not need to be -- aka many kinds of source changed don't need to trigger profile updating. Changes to cold source paths don't matter either.  It is ok for the target source revision of the updated profile to be behind that of the actual build.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147456/new/

https://reviews.llvm.org/D147456



More information about the llvm-commits mailing list