[pulseaudio-discuss] [PATCH 04/25] printout pthread id number in pulseaudio log
Lu Guanqun
guanqun.lu at intel.com
Mon Aug 8 00:51:01 PDT 2011
On Mon, Aug 08, 2011 at 03:38:48PM +0800, Colin Guthrie wrote:
> 'Twas brillig, and Lu Guanqun at 08/08/11 08:55 did gyre and gimble:
> > 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))
>
> I've not looked at the code, but if we know the sink index by this stage
> (I'm not sure we do?) then yes that could be helpful.
Not for now. at pa__init() stage, we don't know the module's index,
however, it can be supported via attached patch.
>
> Pierre will probably know if this is practically useful tho'. I suppose
> in most cases testing and probing will be done with only one sink anyway
> so there is no doubt which one owns the thread :p
I'm justing looking around on this mailing list and would like to get my
hands dirty. :D So either way is OK for me.
--
guanqun
More information about the pulseaudio-discuss
mailing list