[pulseaudio-discuss] [PATCH 04/25] printout pthread id number in pulseaudio log

David Henningsson david.henningsson at canonical.com
Wed Aug 31 18:53:34 PDT 2011


2011-08-08 08:55, Lu Guanqun skrev:
> On Sat, Aug 06, 2011 at 07:10:16PM +0800, Colin Guthrie wrote:
>> 'Twas brillig, and Pierre-Louis Bossart at 05/08/11 16:24 did gyre and
>> gimble:
>>>> there're multiple pthreads in pulseuadio, which makes reading a bit
>>>> confuse.
>>>> this patch can print each pthread's id.
>>>
>>> Wouldn't it be easier to understand if the thread name was used? We
>>> typically rely on thread names to understand what goes on with
>>> ftrace/pytimechart, I would think this is similar here. I would rather see a
>>> log with "alsa-sink" rather than "PID 6779", it'd also make log comparison
>>> and analysis easier.
>>
>> Yup I agree (in an ideal world we'd name the thread by sink index too...
>> (i.e. "alsa-sink 0")
> 
> Hi Col,
> 
> Do you think it's better to invoke pa_thread_new("alsa-sink 0", func, u)
> or adding another index after the plain name? (e.g.
> pa_thread_new("alsa-sink", index, func, u))
> 

Having seen this in action for a while I'd say I like the idea in
general, but I have a few things to wish for if possible:

1) Yes, having "alsa-sink 0" (for whatever 0 means, sink index, module
index) is helpful, e g when you have four soundcards and get an
"Underrun from ALSA!" message and don't know what card that is. My
favorite would be if you can get the ALSA shortname in (e g "alsa-sink
SB" or "alsa-sink Headset") but I don't know if that's easy enough to do.

2) If we can eliminate this information from the main thread (empty
brackets or just remove it altogether), that would reduce most of the
log size increased by this patch.

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list