Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 779400

Summary: >=www-client/firefox-87.0 takes 25% longer when compiled with gcc-10.2.0 vs gcc-9.3.0
Product: Gentoo Linux Reporter: tt_1 <herrtimson>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: CONFIRMED ---    
Severity: normal CC: jstein, mozilla
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Attachments: output from emerge --info (gcc-9)
output from emerge --info (gcc-10)

Description tt_1 2021-03-30 16:11:00 UTC
I noticed this while testing a fix for the crashreporter error: 

firefox-87.0 with gcc-9.3.0 is 40 minutes
firefox-87.0 with gcc-10.2.0 is 51 minutes

The situation seems to be really bad for gcc-11 snapshots 

I'll link a corresponding gcc upstream bug
Comment 1 tt_1 2021-03-30 16:14:49 UTC
Created attachment 696249 [details]
output from emerge --info (gcc-9)
Comment 2 tt_1 2021-03-30 16:15:03 UTC
Created attachment 696252 [details]
output from emerge --info (gcc-10)
Comment 3 tt_1 2021-03-30 17:48:43 UTC
please assign this to toolchain, the hotfix for firefox is in another bug. Thank you!
Comment 4 Thomas Deutschmann gentoo-dev Security 2021-04-02 17:43:26 UTC

*** This bug has been marked as a duplicate of bug 778032 ***
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2021-04-02 18:14:50 UTC
If different default c++ standards are used that's sometimes expected on template heavy code if it has more 'enable_if' in libstdc++.

You'll need to find out where time increase comes from: maybe these a few individual files, or maybe it's a time increase for most compilation units.

For a single-threaded build -ftime-report added to CFLAGS and CXXFLAGS might be good enough to extract timing information.

For a multithreaded build you might need to pass a wrapper that measures time as CC/CXX wrapper to extract useful data.
Comment 6 tt_1 2021-04-02 18:22:38 UTC
Thanks for your input to the problem, this bug was intended to be a proxy bug so to speak for the gcc upstream bug I linked in the see also section. The problem is a lot worse for gcc-11 than gcc-10, if you read the upstream bug and don't think this is relevant for gcc-11 porting that's fine by me, but I'm unable to make that judgement.
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2021-04-02 19:36:11 UTC
Ah, I keep missing the 'see also' section.

Does adding -Dalways_inline= to CFLAGS/CXXFLAGS restore original build time for you?
Comment 8 Thomas Deutschmann gentoo-dev Security 2021-04-02 20:07:42 UTC
Note that our firefox patch set contains upstream code change to mitigate the performance issue.