Hi, I was talking to Tom Tromey about the general idea of dwarf compression through identification of similar DIE trees and replacing them with a single instance and then referencing those similar trees in the main tree through the use of DW_TAG_imported_unit DIEs that have a DW_AT_import attribute pointing to the DW_TAG_partial_unit DIE tree that we separated out.
Now dwarf4 adds another unit variant, the DW_TAG_type_unit (section 3.1.3) which is like a partial unit, but only for types. They cannot be imported normally, but only through a DW_AT_signature attribute that references the DW_TAG_type_unit through a 64bit signature/hash instead of a normal reference, instead of the DIE having an DW_AT_declaration. This seems a special case variant of the way we do dwarf compression. But it may be indicative of the gains we might be seeing. Tom said that for a gdb build on F14 -g -O2 -vs- -gdwarf-4 -O2, gives a size reduction from 16M to 11M. The .debug_info went from 70ffa6 -> 17a63c, the abbrev shrunk and the .debug_types section (where the type units are stored) is smaller than the difference in debug_info. One advantage of the type unit compression is that gdb already has some support for it, while the support for imported partial units is still on some branch. So now we probably should figure out how to cash in on this alternative compression variant. Does it make sense to create a dwarf writer that outputs DW_TAG_type_units instead of DW_TAG_partial_units if they only contain type information DIEs (I am not completely clear on what DIEs are and which are not allowed to be included in the type units). But the references seem somewhat bloated (don't know if that really adds up). Or does it make more sense to transform the type units into partial units when we read them in? But what would be needed to get the libdw/C++ dwarf branch to properly parse type units? Cheers, Mark _______________________________________________ elfutils-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/elfutils-devel
