Bug 24083 - Gold is slow parsing large section-ordering-file file.
Summary: Gold is slow parsing large section-ordering-file file.
Status: ASSIGNED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Cary Coutant
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-10 20:53 UTC by Jan Hubicka
Modified: 2019-01-11 07:35 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
ordering file (72.13 KB, text/plain)
2019-01-10 22:24 UTC, Jan Hubicka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Hubicka 2019-01-10 20:53:48 UTC
HHVM uses --section-ordering-file,/aux/hubicka/hhvm/hphp/hhvm/../tools/oss_hot_section_ordering, which makes gold to link for about 5 minutes spending a lot of time in __gconv_transform_utf8_internal which is being used from gold::Layout::find_section_order_index
Comment 1 Cary Coutant 2019-01-10 21:34:50 UTC
Do you have a lot of glob patterns in your ordering file?

Does setting LC_ALL=C improve the performance? (Assuming that you don't have any non-ASCII strings in your ordering file or among the symbol names.)
Comment 2 Jan Hubicka 2019-01-10 22:24:24 UTC
Created attachment 11529 [details]
ordering file

I am attaching the ordering file. I just spoke with HHVM developers and they say that they had fixed it, so there may be patch for this already.
Comment 3 Cary Coutant 2019-01-11 07:35:40 UTC
> I am attaching the ordering file. I just spoke with HHVM developers and they
> say that they had fixed it, so there may be patch for this already.

Ugh, every last line in that file is a wild card. I'm surprised it only takes 5 minutes. I guess we'll have to do something a bit smarter, then.

Is there a reason you need the '*' at the end of every section name?

Any idea what the fix was? (Was it removing the '*'?)