Message ID | 20111018082809.GA30776@host1.jankratochvil.net |
---|---|
State | New |
Headers | show |
On Tue, Oct 18, 2011 at 10:28:09AM +0200, Jan Kratochvil wrote: > 2011-10-12 Jan Kratochvil <jan.kratochvil@redhat.com> > > Stop producing DW_AT_sibling without -gstrict-dwarf. > * dwarf2out.c (dwarf2out_finish): Remove calls of > add_sibling_attributes if !DWARF_STRICT. Extend the comment with > reason. This is ok for trunk. Jakub
On Tue, 18 Oct 2011 10:38:23 +0200, Jakub Jelinek wrote: > On Tue, Oct 18, 2011 at 10:28:09AM +0200, Jan Kratochvil wrote: > > 2011-10-12 Jan Kratochvil <jan.kratochvil@redhat.com> > > > > Stop producing DW_AT_sibling without -gstrict-dwarf. > > * dwarf2out.c (dwarf2out_finish): Remove calls of > > add_sibling_attributes if !DWARF_STRICT. Extend the comment with > > reason. > > This is ok for trunk. FYI this patch has not yet been checked in, it has negative performance effect on the systemtap DWARF consumer. http://sourceware.org/ml/archer/2011-q4/msg00004.html I will post a patch removing only very short DW_AT_sibling skips later. Thanks, Jan
--- gcc/dwarf2out.c (revision 180121) +++ gcc/dwarf2out.c (working copy) @@ -22496,13 +22496,17 @@ dwarf2out_finish (const char *filename) prune_unused_types (); } - /* Traverse the DIE's and add add sibling attributes to those DIE's - that have children. */ - add_sibling_attributes (comp_unit_die ()); - for (node = limbo_die_list; node; node = node->next) - add_sibling_attributes (node->die); - for (ctnode = comdat_type_list; ctnode != NULL; ctnode = ctnode->next) - add_sibling_attributes (ctnode->root_die); + if (dwarf_strict) + { + /* Traverse the DIE's and add add sibling attributes to those DIE's that + have children. It is produced only for compatibility reasons as it is + both a size and consumer performance hit. */ + add_sibling_attributes (comp_unit_die ()); + for (node = limbo_die_list; node; node = node->next) + add_sibling_attributes (node->die); + for (ctnode = comdat_type_list; ctnode != NULL; ctnode = ctnode->next) + add_sibling_attributes (ctnode->root_die); + } /* Output a terminator label for the .text section. */ switch_to_section (text_section);