This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Linker performance : ppc64_elf_check_directive & add_symbol_adjust
- From: "Andy Younger" <andy dot younger at gmail dot com>
- To: binutils at sourceware dot org, "Andy Younger" <andy dot younger at gmail dot com>
- Date: Thu, 9 Nov 2006 23:32:02 -0800
- Subject: Re: Linker performance : ppc64_elf_check_directive & add_symbol_adjust
- References: <79553f0a0610312339k43b3f732mf7d39e5c2c35d356@mail.gmail.com> <20061105104124.GA19188@bubble.grove.modra.org> <20061107032545.GA23859@bubble.grove.modra.org>
This was from a project involving thousands of input files.
check_directives is called once per input file, and was iterating
over all the symbols. It really only needs to process newly added
dot symbols, so was doing an enormous amout of unnecessary work.
Hi Alan,
Thanks so much for looking at this..
After applying this patch on a vanilla copy of our binutils package I
get a 35% speedup, Pretty damn good! The top 4 functions are now.
47.79 11.35 11.35 4292228 0.00 0.00 sec_merge_hash_lookup
12.29 14.27 2.92 494122 0.00 0.00 walk_wild_section
11.33 16.96 2.69 1746701 0.00 0.00 bfd_hash_lookup
3.41 17.77 0.81 26999695 0.00 0.00 fnmatch
Previously I had some patches applied to do with increasing the hash
table size, which probably account for the difference in times in the
sec_merge_hash_lookup call.
Thanks again,
Andy