Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang's debug information generation slows down linking chrome 20% compared to gcc 4.4 #12313

Closed
nico opened this issue Feb 7, 2012 · 5 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla clang:codegen duplicate Resolved as duplicate

Comments

@nico
Copy link
Contributor

nico commented Feb 7, 2012

Bugzilla Link 11941
Resolution DUPLICATE
Resolved on Feb 07, 2012 15:25
Version unspecified
OS All
CC @asl,@lattner,@echristo

Extended Description

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

@nico
Copy link
Contributor Author

nico commented Feb 7, 2012

assigned to @echristo

@echristo
Copy link
Contributor

echristo commented Feb 7, 2012

Thanks!

@nico
Copy link
Contributor Author

nico commented Feb 7, 2012

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).

@nico
Copy link
Contributor Author

nico commented Feb 7, 2012

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 #7926 ***

@nico
Copy link
Contributor Author

nico commented Nov 27, 2021

mentioned in issue #7926

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:codegen duplicate Resolved as duplicate
Projects
None yet
Development

No branches or pull requests

2 participants