[SERVER-49322] Evaluate feasibility and impact of enabling -fvisibility-inlines-hidden or -fvisibility=hidden Created: 07/Jul/20 Updated: 27/Oct/23 Resolved: 27/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive) |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Server Development Platform
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Building with -fvisibility-inlines-hidden results in a significantly faster startup time for a dynamically linked build. It also results in a smaller text segment. However, it is not entirely without consequence: it can mean that the address of inline functions cannot be compared across DSOs. We should undertake to understand whether the consequences are acceptable in light of the performance impact. See https://gcc.gnu.org/wiki/Visibility for more details. |
| Comments |
| Comment by Spencer Jackson [ 29/Sep/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
andrew.morrow@mongodb.com, I described and fixed the regression in | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 29/Sep/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
spencer.jackson@mongodb.com - Was the regression fixed? I'm interested in seeing what caused it and what the fix was. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Spencer Jackson [ 19/Jul/22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I took some super informal notes on the impact of fvisibility-inlines-hidden on binary startup time, to justify whether I should to fix a recent regression which broke compilation with the flag. My notes are inlined below:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 09/Apr/21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}Message: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 04/Apr/21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}Message: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Bruce Lucas (Inactive) [ 29/Mar/21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
How does this impact the quality of stack traces and symbols reported in the logs (segfaults, invariants, etc.), reported by the heap profiler, and obtained by gdb or pstack against a non-debug build in the field? |