openvortex-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Openvortex-dev] Debugging Tool


From: wderousse
Subject: [Openvortex-dev] Debugging Tool
Date: Mon, 22 Mar 2004 09:14:41 -0600

I found this reading an article on kerneltrap.org. Hopefully
it will come in handy. It's supposedly undocumented:

From: Takashi Iwai [email blocked]
Subject: Re: CONFIG_PREEMPT and server workloads
Date: Thu, 18 Mar 2004 20:08:59 +0100

At Thu, 18 Mar 2004 11:01:59 -0800,
Andrew Morton wrote:
> 
> btw, several months ago we discussed the idea of adding a
sysctl to the
> ALSA drivers which would cause a dump_stack() to be
triggered if the audio
> ISR detected a sound underrun.
> 
> This would be a very useful feature, because it increases
the number of
> low-latency developers from O(2) to O(lots).  If some user
is complaining
> of underruns we can just ask them to turn on the sysctl
and we get a trace
> pointing at the culprit code.
> 
> And believe me, we need the coverage.  There are all sorts
of weird code
> paths which were found during the development of the 2.4
low-latency patch.
> i2c drivers, fbdev drivers, all sorts of things which you
and I don't
> test.
> 
> I know it's a matter of
> 
>       if (sysctl_is_set)
>               dump_stack();
> 
> in snd_pcm_update_hw_ptr_post() somewhere, but my brain
burst when working
> out the ALSA sysctl architecture.
> 
> Is this something you could add please?

oh, sorry, maybe i forgot to tell you that it has been
already there
:)

        # echo 1 > /proc/asound/card0/pcm0p/xrun_debug

this will show the stacktrace when a buffer overrun/underrun
is
detected in the irq handler.  it's not perfect, though.

we can add stacktracing in other nasty places, e.g. when the
unexpected h/w pointer is returned (this is usually because
of sloppy
irq handling).


Takashi

This was lifted from http://kerneltrap.org/node/view/2702

Will




reply via email to

[Prev in Thread] Current Thread [Next in Thread]