[SERVER-20540] Support compiling with split DWARF debug info Created: 21/Sep/15  Updated: 10/Apr/17  Resolved: 21/Mar/17

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 3.2.13, 3.4.4, 3.5.4

Type: Task Priority: Major - P3
Reporter: Adam Midvidy Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v3.4, v3.2
Sprint: Platforms 2017-03-27
Participants:

 Description   

GCC and Clang support compiling the DWARF debugging information to separate .dwo files so that the .o files passed to the linker can remain relatively small. This only works when linking with gold.

We need to compile with -gsplit-dwarf then add -Wl,--gdb-index to the link flags. Anecodotal reports on other projects (e.g. Chromium https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/8tKb9-Wr8gk) show that this can contribute to a 20-80% reduction in link time.

more info https://gcc.gnu.org/wiki/DebugFission



 Comments   
Comment by Githook User [ 10/Apr/17 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-20540 Add an emitter for .dwo generated by -gsplit-dwarf

(cherry picked from commit 39f71f9f17103d47ef9b1234cb506aa8ad420114)
Branch: v3.2
https://github.com/mongodb/mongo/commit/59a2a10d2779e15fc8785fdf100962d65a2cb34f

Comment by Githook User [ 09/Apr/17 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-20540 Add an emitter for .dwo generated by -gsplit-dwarf

(cherry picked from commit 39f71f9f17103d47ef9b1234cb506aa8ad420114)
Branch: v3.4
https://github.com/mongodb/mongo/commit/3554f3ed2972cb2b1cf9db1e9947e56864b554a9

Comment by Andrew Morrow (Inactive) [ 21/Mar/17 ]

This is a safe change for developer builds that we should consistently enable across branches currently under active development.

Comment by Githook User [ 21/Mar/17 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-20540 Add an emitter for .dwo generated by -gsplit-dwarf
Branch: master
https://github.com/mongodb/mongo/commit/39f71f9f17103d47ef9b1234cb506aa8ad420114

Comment by Andrew Morrow (Inactive) [ 26/Sep/15 ]

Another one we should try is -fdebug-types-section but it doesn't seem to work yet: https://evergreen.mongodb.com/version/5606b60f3ff12277dd0002fb_0

Generated at Thu Feb 08 03:54:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.