[PATCH] D96144: [ELF] Add --dwarf32-before-dwarf64 to sort DWARF32 input sections before DWARF64

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 03:17:47 PST 2021


ikudrin added a comment.

In D96144#2548663 <https://reviews.llvm.org/D96144#2548663>, @probinson wrote:

> I've re-read a fair amount of the previous llvm-dev thread.
> One goal of doing a patch like this was to collect some performance data; do we have that?  In particular, performance data comparing link times with the option default-on versus default-off, so we can determine whether the difference is small enough that we should just do this processing unconditionally.

As a modeling example, I took linking `clang`, where all `LLVM` libraries were in the `DWARF32` format and `clang` libraries were `DWARF64`. The partitioning took about 5ms out of 8,950ms total link times. Such a ratio was expected; there are no time-greedy parts in the partitioning code. Are these the numbers you are asking for?

> I'm also wondering whether it is reasonable to collect the is-32/64 characteristic of a section "along the way" during some other processing, rather than iterating over all input sections as a separate pass.  It would have to be during or after the phase that attaches the reloc section to the input section of course.

That would require way more string comparisons to find `.debug_info` input sections in each input file, right? Contrary, this patch does just a few such comparisons over the output sections, assuming that the associated input sections are all of the expected kind.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96144



More information about the llvm-commits mailing list