LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 11941 - clang's debug information generation slows down linking chrome 20% compared to gcc 4.4
Summary: clang's debug information generation slows down linking chrome 20% compared t...
Status: RESOLVED DUPLICATE of bug 7554
Alias: None
Product: clang
Classification: Unclassified
Component: LLVM Codegen (show other bugs)
Version: unspecified
Hardware: PC All
: P enhancement
Assignee: Eric Christopher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-07 13:32 PST by Nico Weber
Modified: 2012-02-07 15:25 PST (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Weber 2012-02-07 13:32:21 PST
object files generated by clang tend to take ~20% longer to link than the ones generated by gcc, due to chubby/different debug information.

I did incremental builds (touch one file, measure rebuild time – this measures almost exclusively ld time) of the chrome binary in several scenarios. In debug builds, the object files generated by clang take up to 6 seconds longer to link into a final binary (36s instead of 30s, or in with a shared library build, 31s instead of 27s). In release builds, there's no big difference.

So while compiling with clang is faster, linking the resulting object files currently takes longer.

Raw numbers (each is the min of 3 runs):

Chrome incremental build times (ninja, gold on by default, debug
builds, gcc4.4, chromeclang)
gcc
touch file in net (net/base/mime_util.cc) 29.4s
touch file in browser (c/b/u/g/chrome_gtk_frame.cc) 32.8s

clang
touch file in net 35.9s
touch file in browser 36.3s

gcc component build (libv8.so instead of libv8.a etc)
touch file in net 26.5s
touch file in browser 8.7s

clang component build
touch file in net 30.8s
touch file in browser 10.6s

(release builds)
gcc
touch file in net 6.4s
touch file in browser 5.9s

clang
touch file in net 6.3s
touch file in browser 6.2s

gcc component
touch file in net 6.7s
touch file in browser 3.1s

clang component
touch file in net 6.6s
touch file in browser 3.2s
Comment 1 Eric Christopher 2012-02-07 13:33:13 PST
Thanks!
Comment 2 Nico Weber 2012-02-07 15:24:20 PST
See also the discussion on bug 7554. That bug's been marked fixed after nlewycky's debug information improvements, but I'm not sure if all the suggested improvements over there have been implemented (cfi sections etc).
Comment 3 Nico Weber 2012-02-07 15:25:49 PST
Actually, it's not been marked fixed :-) So I guess I'll just dupe this over. I'll post some updated numbers on the other bug.

*** This bug has been marked as a duplicate of bug 7554 ***