[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: |
Mon, 4 Apr 2011 18:09:31 -0700 |
Lassi,
On Tue, Mar 22, 2011 at 4:50 PM, Lassi Tuura <address@hidden> wrote:
...
> - The frame caches are thread-local and internal to unw_tdep_trace().
...
I've looked at the committed patch, and I think there may be a problem ;-(
You are using pthread_setspecific() to set the thread-local trace cache,
but pthread_setspecific may call calloc.
I believe that may cause a deadlock if you are unwinding from a signal,
or from malloc/calloc itself.
Fortunately, all Linux/x86_64 systems support __thread, which doesn't suffer
from the same problem.
Is there a particular reason you didn't use __thread?
If not, I'll send a patch.
Thanks!
--
Paul Pluzhnikov