[Asterisk-Dev] no mutex_assert call ?
Luigi Rizzo
rizzo at icir.org
Tue Dec 20 06:04:46 MST 2005
On Tue, Dec 20, 2005 at 06:52:11AM -0600, Kevin P. Fleming wrote:
> Olle E Johansson wrote:
>
> > Check my patches for ast_channel_lock in the issue tracker.
> > I use the counter for debugging messages in Linux. In FreeBSd, I could
> > not find it.
>
> Right, it's very implementation specific.
>
> Turning on DEBUG_THREADS adds Asterisk-specific wrappers around the
...
> I have a project on my board to enhance them to use Thread Local
> Storage (TLS) to track which locks are owned by a thread, with the hope
> that in a core dump we'll actually be able to see that information easily.
BTW do you know, by chance, how to make "static" symbols be
visible to the backtrace_symbols() call so we can try to
get more detailed logs at runtime ?
I am using this code to figure out how we got to places:
/* Obtain a backtrace and print it to stdout. */
void print_trace (void);
void print_trace (void)
{
void *array[50];
size_t size;
char **strings;
size_t i;
size = backtrace (array, 30);
strings = backtrace_symbols (array, size);
ast_log(LOG_WARNING, "Obtained %d stack frames.\n", size);
for (i = 0; i < size; i++)
ast_log(LOG_WARNING, "%s\n", strings[i]);
}
but static symbols (almos all are, in a module) are not visible
so we do not get very interesting info for them.
Also speaking of threads, is there any docs around to get a rough idea
of which threads are created and what do they do ? (e.g. timer
handling, etc ?)
i remember you mentioned some slides you presented at astricon or
some other conference but i cannot recall the url if it was
posted at all
thanks
luigi
More information about the asterisk-dev
mailing list