[PATCH] D125246: [CSSPGO][llvm-profgen] Reimplement CS profile generator using context trie

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 15:39:54 PDT 2022


hoy added a comment.

In D125246#3502570 <https://reviews.llvm.org/D125246#3502570>, @wlei wrote:

> In D125246#3501359 <https://reviews.llvm.org/D125246#3501359>, @hoy wrote:
>
>>> Our experiment on one internal service showed that the context key's memory can be reduced from 80GB to 300MB.
>>
>> This is awesome! Thanks for the work!
>>
>> How about running time?
>
> Just tested the trie based is faster than the old one, E2E running time : 103mins vs 122mins.
>
> The reason for the speed-up should be due to the time spent on getting caller's FunctionSamples. For the new version, it's just call getParentContext() which is O(1).  The old version it generate the caller's context frames then call getFunctionProfileForContext(...), which is O(n), n is the context length.

Very nice. BTW, looks like this is done to line number based profile generation only. How about pseudo probes? Am I missing anything?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125246



More information about the llvm-commits mailing list