[all-commits] [llvm/llvm-project] d5f201: [AutoFDO][llvm-profgen] Profile generation for LBR...

ictwanglei via All-commits all-commits at lists.llvm.org
Fri Sep 24 13:56:38 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d5f2013004ef8d2d9995fd45a154744bf7c264e9
      https://github.com/llvm/llvm-project/commit/d5f2013004ef8d2d9995fd45a154744bf7c264e9
  Author: wlei <wlei at fb.com>
  Date:   2021-09-24 (Fri, 24 Sep 2021)

  Changed paths:
    A llvm/test/tools/llvm-profgen/Inputs/inline-noprobe.perfbin
    A llvm/test/tools/llvm-profgen/Inputs/inline-noprobe.perfscript
    A llvm/test/tools/llvm-profgen/Inputs/inline-noprobe2.perfbin
    A llvm/test/tools/llvm-profgen/Inputs/inline-noprobe2.perfscript
    A llvm/test/tools/llvm-profgen/inline-noprobe.test
    A llvm/test/tools/llvm-profgen/inline-noprobe2.test
    A llvm/test/tools/llvm-profgen/noinline-noprobe.test
    R llvm/test/tools/llvm-profgen/noprobe.test
    M llvm/tools/llvm-profgen/ProfileGenerator.cpp
    M llvm/tools/llvm-profgen/ProfileGenerator.h
    M llvm/tools/llvm-profgen/ProfiledBinary.h
    M llvm/tools/llvm-profgen/llvm-profgen.cpp

  Log Message:
  -----------
  [AutoFDO][llvm-profgen] Profile generation for LBR(non-CS) sample

This patch introduces non-CS AutoFDO profile generation into LLVM. The profile is supposed to be well consumed by compiler using `-fprofile-sample-use=[profile]`.

After range and branch counters are extracted from the LBR sample, here we go through each addresses for symbolization, create FunctionSamples and populate its sub fields like TotalSamples, BodySamples and HeadSamples etc. For inlined code, as we need to map back to original code, so we always add body samples to the leaf frame's function sample.

Reviewed By: wenlei, hoy

Differential Revision: https://reviews.llvm.org/D109551




More information about the All-commits mailing list