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

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 20:54:17 PDT 2022


wlei added a comment.

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.


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