Installing libbacktrace w/ gcc-4.8?

2013-05-17 Thread Ryan Johnson
Hi all, (Please CC me in replies, not a list member) I'd like to use libbacktrace in a C++ app built by gcc-4.8.0 [1], but it seems that the target library doesn't actually get installed, even though it's built. Is there a reason user C/C++ apps shouldn't be able to incorporate libbacktrace

Re: Installing libbacktrace w/ gcc-4.8?

2013-05-17 Thread Ryan Johnson
On 17/05/2013 6:18 PM, Ian Lance Taylor wrote: On Fri, May 17, 2013 at 1:04 PM, Ryan Johnson wrote: Is there a reason user C/C++ apps shouldn't be able to incorporate libbacktrace, or is it just an oversight/TODO? It works beautifully if I copy the relevant files to where they belong i

Excessive calls to iterate_phdr during exception handling

2013-05-27 Thread Ryan Johnson
Hi all, (please CC me in replies, not a list member) I have a large C++ app that throws exceptions to unwind anywhere from 5-20 stack frames when an error prevents the request from being served (which happens rather frequently). Works fine single-threaded, but performance is terrible for 24 t

Re: Excessive calls to iterate_phdr during exception handling

2013-05-28 Thread Ryan Johnson
On 28/05/2013 8:47 PM, Ian Lance Taylor wrote: On Mon, May 27, 2013 at 3:20 PM, Ryan Johnson wrote: I have a large C++ app that throws exceptions to unwind anywhere from 5-20 stack frames when an error prevents the request from being served (which happens rather frequently). Works fine single

Re: Excessive calls to iterate_phdr during exception handling

2013-05-28 Thread Ryan Johnson
On 28/05/2013 11:05 PM, Alan Modra wrote: On Tue, May 28, 2013 at 09:19:48PM -0400, Ryan Johnson wrote: On 28/05/2013 8:47 PM, Ian Lance Taylor wrote: On Mon, May 27, 2013 at 3:20 PM, Ryan Johnson wrote: I'm bringing the issue up here, rather than filing a bug, because I'm not su

Re: Excessive calls to iterate_phdr during exception handling

2013-05-28 Thread Ryan Johnson
On 28/05/2013 11:49 PM, Ian Lance Taylor wrote: On Tue, May 28, 2013 at 6:19 PM, Ryan Johnson wrote: That last point makes me really wonder why we bother grabbing the mutex during unwind at all... at the very least, it would seem profitable to verify the object header cache at throw time

Re: Excessive calls to iterate_phdr during exception handling

2013-05-28 Thread Ryan Johnson
On 29/05/2013 12:01 AM, Ian Lance Taylor wrote: On Tue, May 28, 2013 at 8:50 PM, Ryan Johnson wrote: For example, it should be reasonably safe to let __cxa_allocate_exception call dl_iterate_phdr in order to build a list of object headers valid at the time unwind begins. It already calls

Re: Excessive calls to iterate_phdr during exception handling

2013-05-29 Thread Ryan Johnson
On 29/05/2013 3:36 AM, Jakub Jelinek wrote: Hi! On Wed, May 29, 2013 at 12:02:27AM -0400, Ryan Johnson wrote: Note, swapping the order of dl_iterate_phdr and _Unwind_Find_registered_FDE IMHO is fine. I think what you're saying is that the p_eh_frame_hdr field could end up with a dan

Re: Excessive calls to iterate_phdr during exception handling

2013-05-29 Thread Ryan Johnson
On 29/05/2013 9:41 AM, Ian Lance Taylor wrote: On Tue, May 28, 2013 at 9:02 PM, Ryan Johnson wrote: Maybe I misunderstood... there's currently a (very small) cache (unwind-dw2-fde-dip.c) that lives behind the loader mutex. It contains 8 entries and each entry holds the start and end addr

Re: Excessive calls to iterate_phdr during exception handling

2013-05-30 Thread Ryan Johnson
On 29/05/2013 4:13 AM, Richard Biener wrote: On Wed, May 29, 2013 at 2:47 AM, Ian Lance Taylor wrote: On Mon, May 27, 2013 at 3:20 PM, Ryan Johnson wrote: I have a large C++ app that throws exceptions to unwind anywhere from 5-20 stack frames when an error prevents the request from being

Re: Excessive calls to iterate_phdr during exception handling

2013-06-01 Thread Ryan Johnson
On 29/05/2013 9:41 AM, Ian Lance Taylor wrote: On Tue, May 28, 2013 at 9:02 PM, Ryan Johnson wrote: Maybe I misunderstood... there's currently a (very small) cache (unwind-dw2-fde-dip.c) that lives behind the loader mutex. It contains 8 entries and each entry holds the start and end addr

Re: the struggle to create a 64-bit gcc on Solaris 10

2012-11-10 Thread Ryan Johnson
Eric wrote: > Any pointers at all as to the error of my ways ? http://gcc.gnu.org/install/specific.html#sparc64-x-solaris2 You're up against three factors here. First, the sparc64 platform ABI specifies 32-bit executables unless the user specifically asks for 64-bit. I'm really unclear on why

Re: the struggle to create a 64-bit gcc on Solaris 10

2012-11-10 Thread Ryan Johnson
On 10/11/2012 3:51 PM, Dennis Clarke wrote: Eric wrote: Any pointers at all as to the error of my ways ? http://gcc.gnu.org/install/specific.html#sparc64-x-solaris2 You're up against three factors here. First, the sparc64 platform ABI specifies 32-bit executables unless the user specifically a

Re: the struggle to create a 64-bit gcc on Solaris 10

2012-11-10 Thread Ryan Johnson
On 10/11/2012 4:54 PM, Jonathan Wakely wrote: On 10 November 2012 20:51, Dennis Clarke wrote: So 32-bit gcc works just fine. However I need a pile of libs all over the place ( gmp, mpfr, mpc, etc etc ) for this to work No you don't. If you put gmp, mpfr and mpc in the GCC source tree, or ins