No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
== Summary == | == Summary == | ||
Fedora 18 implemented [[Features/DwarfCompressor]]. As the format did not get widespread and the tool is not much maintained it became burden to make existing debugging tools compatible with Fedora. | Fedora 18 implemented [[Features/DwarfCompressor]]. As the format did not get widespread and the tool is not much maintained it became burden to make existing debugging tools compatible with Fedora debug info. | ||
== Owner == | == Owner == | ||
Line 48: | Line 48: | ||
== Detailed Description == | == Detailed Description == | ||
Debug info files *.debug contained in *-debuginfo.rpm are very big in general (x86_64 Fedora 32 distribution has debug/ directory of 82GB while all its other files are only 75GB). There exist several methods how to make the *-debuginfo.rpms at least a bit smaller. Fedora 18 started using DWZ tool (from [[Features/DwarfCompressor]]) while [https://gcc.gnu.org/pipermail/gcc-patches/2008-August/246281.html Google implemented] a similar but different approach called -fdebug-types-section. | |||
Almost nobody uses existing Fedora DWZ (only Fedora/CentOS/RHEL and SuSE OSes) and so its support is missing in tools like [https://lldb.llvm.org/ LLDB] and [[llvm-dwarfdumphttps://llvm.org/docs/CommandGuide/llvm-dwarfdump.html|llvm-dwarfdump]]. -fdebug-types-section is used internally by Google (produced by clang). Debian does not store any debug info archives. Ubuntu uses neither -fdebug-types-section nor DWZ. | |||
Almost nobody uses existing Fedora DWZ (only Fedora/CentOS/RHEL and SuSE OSes) and so its support is missing in tools like [https://lldb.llvm.org/ LLDB] and [[llvm-dwarfdumphttps://llvm.org/docs/CommandGuide/llvm-dwarfdump.html|llvm-dwarfdump]]. | |||
* DWZ advantage: On the whole Fedora distro it saves 3.3% (5GB of the 157GB distribution size) | * DWZ advantage: On the whole Fedora distro it saves 3.3% (5GB of the 157GB distribution size) | ||
** If the 3.3% size increase is a concern I can implement a different optimization ([https://whova.com/embedded/session/llvm_202010/1193947/ talk (2)]) as a GCC post-processing phase which would require no changes in any DWARF consumers. | |||
* DWZ disadvantage: | * DWZ disadvantage: DWZ has currently less support across consumers (LLDB, llvm-dwarfdump, binutils readelf) | ||
* DWZ disadvantage: DWZ requires 8x times more complicated (LoC count) support in consumers than -fdebug-types-section. | * DWZ disadvantage: DWZ requires 8x times more complicated (LoC count) support in consumers than -fdebug-types-section. | ||
* DWZ disadvantage: DWZ cannot update LLVM .debug_names index which can be generated only by clang (it cannot be regenerated later for DWZ-compressed file) | * DWZ disadvantage: DWZ cannot update LLVM .debug_names index which can be generated only by clang (it cannot be regenerated later for DWZ-compressed file) | ||
* DWZ disadvantage: DWZ DWARF-5 support is a work-in-progress and there is no plan to support DWARF-5 produced by clang | * DWZ disadvantage: DWZ DWARF-5 support is a work-in-progress and there is no plan to support DWARF-5 produced by clang | ||
* DWZ disadvantage: Compilation (linking) requires 2x as big disk space (as DWZ is processing files after linker and DWZ is incompatible with -fdebug-types-section) | |||
* DWZ disadvantage: Compilation (linking) is slower | |||
This proposal was originally submitted already for Fedora 18 [[Features/DebugTypesSections]]. | |||
== Feedback == | == Feedback == | ||
Line 157: | Line 157: | ||
- Green has been scientifically proven to be the most relaxing color. The move to a default background color of green with green text will result in Fedora users being the most relaxed users of any operating system. | - Green has been scientifically proven to be the most relaxing color. The move to a default background color of green with green text will result in Fedora users being the most relaxed users of any operating system. | ||
--> | --> | ||
* Better compatibility with existing debugging and tracing tools. | |||
* Less resource-intensive rebuilds of C++ packages (both in disk space, memory requirements and compilation time). | |||
== Dependencies == | == Dependencies == | ||
Line 177: | Line 177: | ||
<!-- Is there upstream documentation on this change, or notes you have written yourself? Link to that material here so other interested developers can get involved. --> | <!-- Is there upstream documentation on this change, or notes you have written yourself? Link to that material here so other interested developers can get involved. --> | ||
* [http://www.dwarfstd.org/doc/DWARF5.pdf DWARF-5] E.2 Using Type Units | |||
* [https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#index-fdebug-types-section GCC -fdebug-types-section] | |||
== Release Notes == | == Release Notes == |
Revision as of 14:35, 23 September 2020
Debug Info Standardization
Summary
Fedora 18 implemented Features/DwarfCompressor. As the format did not get widespread and the tool is not much maintained it became burden to make existing debugging tools compatible with Fedora debug info.
Owner
- Name: Jan Kratochvil
- Email: jan.kratochvil@redhat.com
Current status
- Targeted release: Fedora 34
- Last updated: 2020-09-23
- FESCo issue: <will be assigned by the Wrangler>
- Tracker bug: <will be assigned by the Wrangler>
- Release notes tracker: <will be assigned by the Wrangler>
Detailed Description
Debug info files *.debug contained in *-debuginfo.rpm are very big in general (x86_64 Fedora 32 distribution has debug/ directory of 82GB while all its other files are only 75GB). There exist several methods how to make the *-debuginfo.rpms at least a bit smaller. Fedora 18 started using DWZ tool (from Features/DwarfCompressor) while Google implemented a similar but different approach called -fdebug-types-section.
Almost nobody uses existing Fedora DWZ (only Fedora/CentOS/RHEL and SuSE OSes) and so its support is missing in tools like LLDB and llvm-dwarfdump. -fdebug-types-section is used internally by Google (produced by clang). Debian does not store any debug info archives. Ubuntu uses neither -fdebug-types-section nor DWZ.
- DWZ advantage: On the whole Fedora distro it saves 3.3% (5GB of the 157GB distribution size)
- If the 3.3% size increase is a concern I can implement a different optimization (talk (2)) as a GCC post-processing phase which would require no changes in any DWARF consumers.
- DWZ disadvantage: DWZ has currently less support across consumers (LLDB, llvm-dwarfdump, binutils readelf)
- DWZ disadvantage: DWZ requires 8x times more complicated (LoC count) support in consumers than -fdebug-types-section.
- DWZ disadvantage: DWZ cannot update LLVM .debug_names index which can be generated only by clang (it cannot be regenerated later for DWZ-compressed file)
- DWZ disadvantage: DWZ DWARF-5 support is a work-in-progress and there is no plan to support DWARF-5 produced by clang
- DWZ disadvantage: Compilation (linking) requires 2x as big disk space (as DWZ is processing files after linker and DWZ is incompatible with -fdebug-types-section)
- DWZ disadvantage: Compilation (linking) is slower
This proposal was originally submitted already for Fedora 18 Features/DebugTypesSections.
Feedback
Benefit to Fedora
Scope
- Proposal owners:
It affects all packages generating *-debuginfo.rpm.
- Other developers:
Report any possible debuginfo incompatibility (unexpected).
- Release engineering: #Releng issue number (a check of an impact with Release Engineering is needed)
- Policies and guidelines:
All the needed changes should be done in redhat-rpm-config. The dwz package can be then retired.
- Trademark approval: N/A (not needed for this Change)
- Alignment with Objectives:
The size differences are only for *-debuginfo.rpm which is outside of scope of the listed objectives.
Upgrade/compatibility impact
As *-debuginfo.rpm must exactly match NVRA of its binary package the compatibility is not relevant. Existing tools supporting DWZ will still support the DWZ file format in packages which have not been rebuilt.
How To Test
It is not a big risk, -fdebug-types-section is more widespread and more simple than DWZ. Still I should run:
* libabigail DWARF comparisons * testsuites of tools like: clang, lldb, gcc, binutils, gdb, elfutils, rpm
User Experience
- Better compatibility with existing debugging and tracing tools.
- Less resource-intensive rebuilds of C++ packages (both in disk space, memory requirements and compilation time).
Dependencies
none
Contingency Plan
- Contingency mechanism: Nothing needed, Fedora can continue using DWZ, just some debugging/tracing tools will continue to be incompatible.
- Contingency deadline: beta freeze
- Blocks release? No
- Blocks product? N/A
Documentation
- DWARF-5 E.2 Using Type Units
- GCC -fdebug-types-section