On Wed, May 17, 2017 at 7:13 AM, Andi Kleen <a...@linux.intel.com> wrote:
> On Tue, May 16, 2017 at 08:40:02PM -0700, Andrew Pinski wrote:
>> On Tue, May 16, 2017 at 7:16 PM, Andi Kleen <a...@firstfloor.org> wrote:
>> > From: Andi Kleen <a...@linux.intel.com>
>> >
>> > When running creduce on an ICE substantial amounts of the total
>> > CPU time go to backtrace_qsort() (sorting dwarf of the compiler) for
>> > printing the backtrace of the ICE. When running a reduction we don't need 
>> > the
>> > backtrace. So add a -dB option to turn it off, and make reduction
>> > a bit faster.
>>
>> The other thing which you could is strip the binaries.  :)
>> j/k.  I think this is a good patch and a good idea.
>
> AFAIK the sort is for the unwind tables. strip removes .dwarf*, but not .eh_*
> It can't because that would break C++ exceptions.

This is libbacktrace.  The calls to backtrace_qsort are for the DWARF
information.  libbacktrace sorts the debug info so it can do faster
lookups of PC values.

That said I'm surprised it takes that much time.  The DWARF info is
usually mostly sorted, and backtrace_qsort is optimized for
information that is mostly sorted.  If you feel like spending time on
this it might be worth figuring out why it is slow.

Ian

Reply via email to