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

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 5 11:13:50 PST 2022


hoy accepted this revision.
hoy added inline comments.


================
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
+
----------------
wlei wrote:
> hoy wrote:
> > ayermolo wrote:
> > > hoy wrote:
> > > > wlei wrote:
> > > > > hoy wrote:
> > > > > > Add a test case for no --dwp?
> > > > > Good point, added. Without -dwp, it will only load the inliner function.
> > > > Thanks for adding the test. Per the dwo switch description, should the dwo file be loaded if it is not specified and placed alongside with the binary?
> > > > 
> > > > `When not specified, it will be <binary>.dwp in the same directory as the main binary.` 
> > > > 
> > > > I guess it'll look for `split-dwarf-split-inlining.perfbin.dwo` instead of `split-dwarf-split-inlining.dwo`?
> > > .dwo/.o files don't need to be next to the binary, and there is no assumption that they will be. In fact in production environment they are not. The fully resolved path is specified in DWARF CU. If .dwo/.o files are not there then it's a warning/error. Depending on context.
> > Yeah, but in this case we have them side by side. I guess it's an issue of the file naming that resulted in the dwo file not loaded. Should we change the arg description to not support the automatic load?
> Yeah, for .dwo/.o files, if not specified --dwp, it will used the path encoded in the CU and it's an absolute path. In this test, the path is pointed to a directory in my machine, so it will fail for others.
> 
> For .dwp file, if not specified --dwp, it will be <binary>.dwp in the same directory.
> 
> In fact, --dwp is designed only to be used for .dwp file. In real case, we won't expect -dwp used for .dwo/.o files, here only work around for the testing.
I see. I misunderstood dwo files as dwp files. It's clear to me now. Can you please add the clarification in the description of the dwp switch? LGTM otherwise.


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