Bug 133078 - Linking mozilla gecko over 2x slower than in fc2
Linking mozilla gecko over 2x slower than in fc2
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
3
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks: FC3Target
  Show dependency treegraph
 
Reported: 2004-09-21 11:34 EDT by T. Rowley
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version: binutils-2.15.92.0.2-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-15 03:14:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description T. Rowley 2004-09-21 11:34:01 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3)
Gecko/20040921

Description of problem:
Linking a debug libgklayout (the core gecko library) takes over twice
the amount of time on FC3T2 than FC2, both fully updated.

Timing done on the same hardware and same partition holding the source
and object directories.  Full objdirs were built for both systems
using the default gcc.  Time measured using time(1) after three runs
to ensure a warm filesystem cache.

Test system is a 2.4GHz P4 with 512MB of memory.

Version-Release number of selected component (if applicable):
binutils-2.15.91.0.2-8

How reproducible:
Always

Steps to Reproduce:
1. Obtain mozilla source (cvs, snapshot, or release)
2. Configure with --disable-optimize --enable-debug
--disable-postscript (last needed due to a freetype version problem
with fc3t2)
3. Build
4. "cd $(objdir)/layout/build"
5. "rm libgklayout.so"
6. "time make"
7. goto step 4 and repeat until time stabilizes

Actual Results:  Elapsed real time -

  FC2:    41 seconds
  FC3T2: 110 seconds



Expected Results:  Similar link times, or hopefully even faster on fc3t2.


Additional info:
Comment 1 T. Rowley 2004-09-21 13:42:26 EDT
A thought: you might want to use cvs or a recent source snapshot 
of mozilla rather than a release version, as bryner has been landing 
visibility and calling convention changes that might affect the
link time.  My timings were done on a cvs pull.
Comment 2 Jakub Jelinek 2004-09-21 15:47:45 EDT
Does mozilla now use the C++ visibility stuff?
(http://gcc.gnu.org/ml/gcc-patches/2004-07/txt00076.txt and followups)
GCC in FC2 doesn't have this patch while GCC in FC3t2 has.
Comment 3 Brian Ryner 2004-09-21 16:00:45 EDT
We're not using any of the new gcc visibility flags yet for Mozilla. 
We do use __attribute__ ((visibility ("hidden"))) in the code.
Comment 4 Jakub Jelinek 2004-10-13 13:19:23 EDT
Ok, reproduced, with all libraries/object files copied from
FC3t3 and just invoking linker with:
ld --eh-frame-hdr -m elf_i386 -shared -o libgklayout.so crti.o crtbeginS.o -L. -h libgklayout.so nsLayoutModule.o nsContentHTTPStartup.o nsContentDLF.o --whole-archive libgkhtmlbase_s.a libgkhtmldoc_s.a libgkhtmlforms_s.a libgkhtmlstyle_s.a libgkhtmltable_s.a libgkxulbase_s.a libgkbase_s.a libgkconbase_s.a libgkconevents_s.a libgkconhtmlcon_s.a libgkconhtmldoc_s.a libgkconhtmlstyle_s.a libgkconxmlcon_s.a libgkconxmldoc_s.a libgkconxbl_s.a libgkconxuldoc_s.a libgkconshared_s.a libgkview_s.a libjsdombase_s.a libjsdomevents_s.a libjsurl_s.a libgkxultree_s.a libgkxulgrid_s.a libgkconxulcon_s.a libgkconxultmpl_s.a libgkmathmlcon_s.a libgkmathmlbase_s.a --no-whole-archive -lgkgfx libunicharutil_s.a -lxpcom -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lmozjs -Bsymbolic -ldl -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s crtendS.o crtn.o
I get:
$ time ld `cat args`
real    0m16.886s
user    0m11.310s
sys     0m1.320s
$ time ld `cat args`
real    0m15.931s
user    0m13.730s
sys     0m1.430s
$ time ld `cat args`
real    0m17.683s
user    0m13.670s
sys     0m1.630s
on FC2 and
$ time ld `cat args`
real    0m43.156s
user    0m41.060s
sys     0m1.420s
$ time ld `cat args`
real    0m34.084s
user    0m32.980s
sys     0m1.110s
$ time ld `cat args`
real    0m32.864s
user    0m31.380s
sys     0m1.360s
on FC3t3.
Comment 5 Jakub Jelinek 2004-10-13 13:54:33 EDT
samples  %        symbol name
4369973  77.4009  try_match_symbols_in_sections
431863    7.6492  walk_wild_section
422038    7.4751  bfd_hash_traverse
161373    2.8582  bfd_hash_lookup
47544     0.8421  anonymous symbol from section .plt
35194     0.6234  _bfd_elf_section_from_bfd_section
13852     0.2453  elf_i386_check_relocs
13253     0.2347  bfd_elf_final_link
12146     0.2151  _bfd_final_link_relocate
9814      0.1738  get_special_section
8573      0.1518  bfd_elf_local_sym_name
7681      0.1360  _bfd_relocate_contents
7596      0.1345  elf_i386_relocate_section
5905      0.1046  bfd_elf_string_from_elf_section

said oprofile...

Note You need to log in before you can comment on or make changes to this bug.