[PATCH] D115973: [llvm-profgen] Support symbol loading for debug fission

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 4 20:21:20 PST 2022


wlei added inline comments.


================
Comment at: llvm/test/tools/llvm-profgen/split-dwarf.test:2
+; RUN: echo -e "0\n0" > %t
+; RUN: llvm-profgen --format=text --unsymbolized-profile=%t --dwp=%S/Inputs/split-dwarf-single.o --binary=%S/Inputs/split-dwarf-single.perfbin --output=%t1 --fill-zero-for-all-funcs
+; RUN: FileCheck %s --input-file %t1 --check-prefix=CHECK-SPLIT-DWARF
----------------
ayermolo wrote:
> hoy wrote:
> > A dumb question. In the single mode, where does the dwo object live? Is it in the immediate .o and all such .o should be saved for debugging?
> Yes, in single mode dwo sections remain in the lo files.
Yeah, I think when used in the real service, they're all packaged in dwp file, here it's only for testing.


================
Comment at: llvm/test/tools/llvm-profgen/split-dwarf.test:12
+; RUN: llvm-profgen --format=text --unsymbolized-profile=%t --dwp=%S/Inputs/split-dwarf-split-inlining.dwo --binary=%S/Inputs/split-dwarf-split-inlining.perfbin --output=%t4 --fill-zero-for-all-funcs
+; RUN: FileCheck %s --input-file %t4 --check-prefix=CHECK-SPLIT-DWARF
+
----------------
hoy wrote:
> Add a test case for no --dwp?
Good point, added. Without -dwp, it will only load the inliner function.


================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.cpp:685
+      DWARFUnit *DWOCU = DwarfUnit->getNonSkeletonUnitDIE(false).getDwarfUnit();
+      if (!DWOCU->isDWOUnit()) {
+        std::string DWOName = dwarf::toString(
----------------
hoy wrote:
> What is a DWO unit checked against here? Is it an indirection to the real compilation unit?
I think it's an internal check whether the current parsed result is a DWO unit.
The `getNonSkeletonUnitDIE` is expected to get a DWOUnit, if the parsing failed and not a DWOUnit, it's likely due to the incorrect dwo file path.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115973/new/

https://reviews.llvm.org/D115973



More information about the llvm-commits mailing list