Skip to content

Debug info diet! #3350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 7, 2016
Merged

Debug info diet! #3350

merged 6 commits into from
Jul 7, 2016

Conversation

adrian-prantl
Copy link
Contributor

What's in this pull request?

Now that Swift AST type support in LLDB has matured, we can stop emitting DWARF
type information by default to reduce compile time and ibject file size.
A future commit will change -g to emit only AST type references.

The full set of debug options is now
-gnone
-gline-tables-only
-g                 // AST types (= everything that LLDB needs)
-gdwarf-types      // AST types + DWARF types (for legacy debuggers)

Note that the size difference between -gdwarf-types and -g is measurable, but not really significant in the bigger picture since DWARF is already a highly compressed format. On a Release Swift.o (x86_64 stdlib) emitting the AST types only saves ~100kb of debug info.

Resolved bug number: rdar://problem/25498103


Validation Testing

@swift-ci Please test and merge

…(NFC-ish)

Background
----------

Now that Swift AST type support in LLDB has matured, we can stop emitting DWARF
type information by default to reduce compile time and ibject file size.
A future commit will change -g to emit only AST type references.

The full set of debug options will be
-gnone
-gline-tables-only
-g                 // AST types (= everything that LLDB needs)
-gdwarf-types      // AST types + DWARF types (for legacy debuggers)
@adrian-prantl
Copy link
Contributor Author

@swift-ci Please test

@gribozavr
Copy link
Contributor

Would we still emit line tables in DWARF?

@adrian-prantl
Copy link
Contributor Author

Of course! This is only about getting rid of type information that is redundant with the swift AST modules. This is quite similar to what we do in clang with -gmodules: Instead of describing the layout and structure of all types we only emit a forward-declaration of the type (and its mangled name) so it can be found in the Swift AST module.
There's much more to debug info besides type information: line tables, inline information, lexical and function scopes, variables and their locations — all of which are unaffected by this.

@adrian-prantl
Copy link
Contributor Author

@swift-ci Please test OS X platform

1 similar comment
@adrian-prantl
Copy link
Contributor Author

@swift-ci Please test OS X platform

@adrian-prantl adrian-prantl merged commit b1e0afc into swiftlang:master Jul 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants