[PATCH] D114565: [InstrProf] Attach debug info to counters

Ellis Hoag via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 29 17:05:55 PST 2021


ellis created this revision.
Herald added subscribers: ormris, wenlei, hiraditya.
ellis edited the summary of this revision.
ellis added reviewers: MaskRay, alanphipps, wenlei, kyulee, davidxl.
ellis edited the summary of this revision.
ellis published this revision for review.
Herald added projects: clang, Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers, cfe-commits.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114565

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114565.389614.patch
Type: text/x-patch
Size: 21087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211130/57837581/attachment-0001.bin>


More information about the cfe-commits mailing list