bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/28441] New: [RISCV] ld linker relaxation is really slow


From: wcohen at redhat dot com
Subject: [Bug ld/28441] New: [RISCV] ld linker relaxation is really slow
Date: Mon, 11 Oct 2021 00:44:14 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28441

            Bug ID: 28441
           Summary: [RISCV] ld linker relaxation is really slow
           Product: binutils
           Version: 2.35
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: wcohen at redhat dot com
  Target Milestone: ---

Created attachment 13718
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13718&action=edit
perf annotation of riscv_relax_delete_bytes function

After getting perf annotate working for the RISCV
(https://www.spinics.net/lists/linux-perf-users/msg14852.html) I collected perf
data on systemtap being built on a prototype beagle v board to see where it was
spending time. I noticed that the build was spending a very large amount of
time (>90%) in the code of binutils implementing the relaxation
(https://www.sifive.com/blog/all-aboard-part-3-linker-relaxation-in-riscv-toolchain).
 This binutils appears to be a  Fedora 33 build of the stock
binutils-2.35-18.fc33.riscv64
(http://fedora.riscv.rocks/koji/buildinfo?buildID=192459 ).   Below is
beginning of the "perf report --stdio" output:


# To display the perf.data header info, please use --header/--header-only
options.
#
#
# Total Lost Samples: 0
#
# Samples: 5M of event 'task-clock:u'
# Event count (approx.): 1330053000000
#
# Overhead  Command          Shared Object                              Symbol  
# ........  ...............  ......................................... 
........................................................
#
    94.46%  ld               libbfd-2.35-18.fc33.so                     [.]
riscv_relax_delete_bytes
     1.27%  ld               libc-2.32.so                               [.]
_wordcopy_fwd_dest_aligned
     0.81%  ld               libbfd-2.35-18.fc33.so                     [.]
_bfd_riscv_relax_section.lto_priv.0
     0.18%  ld               libbfd-2.35-18.fc33.so                     [.]
elf_sort_elf_symbol
     0.17%  ld               libbfd-2.35-18.fc33.so                     [.]
bfd_elf_final_link
     0.16%  ld               ld.bfd                                     [.]
sha1_process_block


For more detail on riscv_relax_delete_bytes ran and added as an attachment:

perf annotate riscv_relax_delete_bytes --stdio > ~/riscv_relax_delete_bytes.log

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]