[PATCH] D59311: [ELF] Print symbols ordered by profiled guided section layout with verbose.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 13:00:41 PDT 2019
ruiu added inline comments.
================
Comment at: lld/ELF/CallGraphSort.cpp:235
+ for (int SecIndex : C.Sections)
+ outs() << Sections[SecIndex]->Name << "\n";
+ }
----------------
tcwang wrote:
> pcc wrote:
> > Should this go to a file with a user-specified name (without the header) instead of stdout? I'd expect the output of this to be consumed by a script, and sending it to a file would probably make it easier for said script to consume.
> >
> > Also, should this be listing the symbols instead of the sections if the intent is to pass this to --symbol-ordering-file?
> I strongly agree that these suggestions would improve our lives if we want to use the outputs to feed --symbol-ordering-file in later pass. (Actually, right now I have to use a separate script to process the standard output and removing the headers to generate order file.)
>
> I'd love to improve this part, if it is OK to add a flag to support it. (And do you have any suggestions on the name of the flag?) Also, do you have some suggestions how to remove the headers cleanly? I don't see there's an option to remove the added prefix in the Name field of InputSectionBase? I don't think I should just try to remove ".text" (or ".text.hot" in some cases). Thank you!
OK, that's fine. If that's the case, print out only symbol names to the file (without the header line). As to the option name, --print-symbol-order=FILENAME?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59311/new/
https://reviews.llvm.org/D59311
More information about the llvm-commits
mailing list