[compiler-rt] [llvm] Reland "[TypeProf][InstrPGO] Introduce raw and instr profile format change for type profiling." (PR #82711)

Wentao Zhang via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 31 19:29:28 PDT 2024


whentojump wrote:

> Updated in https://github.com/llvm/llvm-project/commit/f87bde2962dded71599034880f57f742ea371888

Thanks!

By the way, https://llvm.org/docs/InstrProfileFormat.html is a really informative page. Thanks for your contributions!

> Before seeing your comment, I don't have plans to back port the version update to LLVM version 18. Could you elaborate on how back porting a version bump to LLVM branch 18 helps? I have seen back-ports for bug fixes but haven't done it myself. I'm glad to back port if it helps.

Sorry for not making it clear -- in fact, *not* backporting it can better help our use cases. :)) or :((

In short, we are instrumenting some OS kernels, like what [this patch](https://lore.kernel.org/linux-doc/20210407211704.367039-1-morbo@google.com/) does.

In kernel space, it's impossible to dump the profiles using any "runtime". So instead, some kernel code itself has to do this job. As a result, this piece of kernel code has to keep synchronized with LLVM code, e.g. in terms of profile format. That's why a stable format is certainly more desirable for us. You may notice in the linked patch: they were using raw profile version 5 three years ago and now we are 10 already. (In user space, this should not be a problem, because whatever produces or consumes the profile usually comes from the same version of LLVM.)

That being said, please make the decision at your own discretion, or based on broader community feedback. :))


https://github.com/llvm/llvm-project/pull/82711


More information about the llvm-commits mailing list