Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 779400 - >=www-client/firefox-87.0 takes 25% longer when compiled with gcc-10.2.0 vs gcc-9.3.0
Summary: >=www-client/firefox-87.0 takes 25% longer when compiled with gcc-10.2.0 vs g...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/PR99785
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-30 16:11 UTC by tt_1
Modified: 2021-05-30 19:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output from emerge --info (gcc-9) (gcc-9-emerge-info,7.64 KB, text/plain)
2021-03-30 16:14 UTC, tt_1
Details
output from emerge --info (gcc-10) (gcc-10-emerge-info,5.86 KB, text/plain)
2021-03-30 16:15 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
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.