https://sourceware.org/bugzilla/show_bug.cgi?id=29505
--- Comment #8 from Nick Clifton <nickc at redhat dot com> --- (In reply to Ralf Habacker from comment #7) Hi Ralf, >> If so are you able to enable profiling and find out which memset(s) are >> taking all the time ? > > You can see this at https://bugzilla.opensuse.org/attachment.cgi?id=860901 OK, so it looks like calls to an alloc() function inside read_and_display_attr_value() are the source of the problem. There appear to be two of these, one for allocating and extending the location list array and one for allocating and extending the range list array. Neither of them are particularly optimized. Would you mind trying a small test ? Does this patch make any difference to the performance ? diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 71d8bc9ed5c..0fa4af9ac05 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -2855,7 +2855,7 @@ read_and_display_attr_value (unsigned long attribute, if (lmax == 0 || num >= lmax) { - lmax += 1024; + lmax += 10240; debug_info_p->loc_offsets = (uint64_t *) xcrealloc (debug_info_p->loc_offsets, lmax, sizeof (*debug_info_p->loc_offsets)); @@ -2929,7 +2929,7 @@ read_and_display_attr_value (unsigned long attribute, if (lmax == 0 || num >= lmax) { - lmax += 1024; + lmax += 10240; debug_info_p->range_lists = (uint64_t *) xcrealloc (debug_info_p->range_lists, lmax, sizeof (*debug_info_p->range_lists)); Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug.