[all-commits] [llvm/llvm-project] 58d9c1: [Try2][InstrProf] Attach debug info to counters

Ellis Hoag via All-commits all-commits at lists.llvm.org
Thu Dec 16 14:20:45 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58d9c1aec88d5d4c783643df057d87f6b0c9f693
      https://github.com/llvm/llvm-project/commit/58d9c1aec88d5d4c783643df057d87f6b0c9f693
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2021-12-16 (Thu, 16 Dec 2021)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M compiler-rt/include/profile/InstrProfData.inc
    M compiler-rt/lib/profile/InstrProfiling.c
    M compiler-rt/lib/profile/InstrProfilingMerge.c
    M compiler-rt/lib/profile/InstrProfilingWriter.c
    M llvm/include/llvm/ProfileData/InstrProf.h
    M llvm/include/llvm/ProfileData/InstrProfData.inc
    M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
    M llvm/lib/ProfileData/InstrProf.cpp
    M llvm/lib/ProfileData/InstrProfWriter.cpp
    M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
    M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
    A llvm/test/Instrumentation/InstrProfiling/debug-info-correlate.ll

  Log Message:
  -----------
  [Try2][InstrProf] Attach debug info to counters

Add the llvm flag `-debug-info-correlate` to attach debug info to instrumentation counters so we can correlate raw profile data to their functions. Raw profiles are dumped as `.proflite` files. The next diff enables `llvm-profdata` to consume `.proflite` and debug info files to produce a normal `.profdata` profile.

Part of the "lightweight instrumentation" work: https://groups.google.com/g/llvm-dev/c/r03Z6JoN7d4

The original diff https://reviews.llvm.org/D114565 was reverted because of the `Instrumentation/InstrProfiling/debug-info-correlate.ll` test, which is fixed in this commit.

Reviewed By: kyulee

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




More information about the All-commits mailing list