[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] Updated fast trace patch with initial performance
From: |
Paul Pluzhnikov |
Subject: |
Re: [Libunwind-devel] Updated fast trace patch with initial performance results |
Date: |
Tue, 5 Apr 2011 17:05:40 -0700 |
On Tue, Apr 5, 2011 at 4:53 PM, Arun Sharma <address@hidden> wrote:
> On Tue, Apr 5, 2011 at 4:32 PM, Paul Pluzhnikov <address@hidden> wrote:
>
>> Safer? I don't see how. You are still calling pthread_setspecific from a
>> potentially unsafe context.
>
> I meant: it gives us some freedom to move pthread_setspecific() call
> around. Like you observe, there is no safe place to call it from
> within libunwind.
Thanks for clarification.
> I lean towards #3:
>
> . Switch to using __thread, figure out some (likely extremely non-portable)
> way to perform cleanup on thread termination.
>
> This could be as simple as documenting a function that users are
> required to call on thread idle/exit to cleanup.
Right. It doesn't have to be idle/exit -- just calling
unwind_per_thread_once() from somewhere safe (so we can register the
specific with destructor) is enough.
If the user forgets, he gets a memory leak.
The Windows scheme of calling DllMain() with THREAD_{ATTACH,DETACH} sure
looks attractive right now.
--
Paul Pluzhnikov
- Re: [Libunwind-devel] Updated fast trace patch with initial performance results, (continued)
- Re: [Libunwind-devel] Updated fast trace patch with initial performance results, Lassi Tuura, 2011/04/05
- Re: [Libunwind-devel] Updated fast trace patch with initial performance results, Lassi Tuura, 2011/04/05
- Re: [Libunwind-devel] Updated fast trace patch with initial performance results, Arun Sharma, 2011/04/05
- Re: [Libunwind-devel] Updated fast trace patch with initial performance results, Lassi Tuura, 2011/04/05
- Re: [Libunwind-devel] Updated fast trace patch with initial performance results, Arun Sharma, 2011/04/05
- Re: [Libunwind-devel] Updated fast trace patch with initial performance results, Lassi Tuura, 2011/04/05
- Re: [Libunwind-devel] Updated fast trace patch with initial performance results, Arun Sharma, 2011/04/05
- Re: [Libunwind-devel] Updated fast trace patch with initial performance results, Paul Pluzhnikov, 2011/04/05
- Re: [Libunwind-devel] Updated fast trace patch with initial performance results, Arun Sharma, 2011/04/05
- Re: [Libunwind-devel] Updated fast trace patch with initial performance results,
Paul Pluzhnikov <=