[all-commits] [llvm/llvm-project] 6b856a: [PseudoProbe] Use probe id as the base dwarf discr...

Hongtao Yu via All-commits all-commits at lists.llvm.org
Fri Sep 8 09:50:08 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b856abc6fec04b523c17aab96f9877f40e7b7ab
      https://github.com/llvm/llvm-project/commit/6b856abc6fec04b523c17aab96f9877f40e7b7ab
  Author: Hongtao Yu <hoy at fb.com>
  Date:   2023-09-08 (Fri, 08 Sep 2023)

  Changed paths:
    M llvm/include/llvm/IR/DebugInfoMetadata.h
    M llvm/test/Transforms/SampleProfile/pseudo-probe-inline.ll
    A llvm/test/tools/llvm-profgen/inline-probe-afdo.test

  Log Message:
  -----------
  [PseudoProbe] Use probe id as the base dwarf discriminator for callsites (#65685)

With `-fpseudo-probe-for-profiling`, the dwarf discriminator for a
callsite will be overwritten to pseudo probe related information for
that callsite. The probe information is encoded in a special format
(i.e., with all lowest three digits be one) in order to be distinguished
from regular dwarf discriminator. The special encoding format will be
decoded to zero by the regular discriminator logic. This means all
callsites would have a zero discriminator in both the sample profile and
the compiler, for classic AutoFDO. This is inconvenient in that no
decent classic AutoFDO can be generated from a pseudo probe build. I'm
mitigating the issue by allowing callsite probe id to be used as the
base dwarf discriminator for classic AutoFDO, since probe id is also
unique and can be used to differentiate callsites on the same source
line.




More information about the All-commits mailing list