[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] unw_backtrace(): Performance slowdown for ARM?

From: Chris January
Subject: Re: [Libunwind-devel] unw_backtrace(): Performance slowdown for ARM?
Date: Thu, 18 Jan 2018 12:00:13 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

Hello Luke,

On 18/01/18 07:53, Luke Diamand wrote:
On 17 January 2018 at 15:55, Dave Watson <address@hidden> wrote:
I didn't notice anything in particular looking at the commit logs.
I'll try and repro when I get a chance
arm_find_proc_info() seems to start out trying eh_frame tables. Isn't
it always best on ARM to start looking in the exidx tables?
Sounds reasonable to me, although I'm not an arm expert.  Did the
default change somewhere?  I couldn't find anything looking at the
I'm definitely not an expert!

But the exidx tables are quite a bit smaller than the DWARF tables: on
the code I'm working on, I see ~2MB on the MIPS target vs ~0.5MB on
the ARM target for the unwind tables. And I don't think there's even
an option in gcc to choose anything else.

And this presentation by Linaro (who _are_ experts!) says "Unwinding
on ARM is different - no .eh_frame but .ARM.exidx and .ARM.extab".
Whether the compiler generates a .eh_frame section or an .ARM.exidx
section depends on the toolchain so a generic unwinder such as libunwind
needs to support both.

On aarch32 ARM libunwind also defaults to --enable-debug-frame=yes. This
can cause libunwind to open and read the executable and any shared
libraries every unwind if the .eh_frame section is missing or does not
cover all addresses, which matches your comment that it is opening and
closing files a lot. If you know you have .ARM.exidx sections then try
configuring libunwind with --enable-debug-frame=no.

Chris January

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]