[pulseaudio-discuss] Re : Effects of Clock Resolution on Pulseaudio
lennart at poettering.net
Wed Jul 30 12:08:07 PDT 2008
On Tue, 22.07.08 17:13, Nick Thompson (rextanka at comcast.net) wrote:
>>> So i am not sure what part of Pulseaudio is causing high CPU Utilization
>> Hmm, could you do some profiling then? Just the most basic. I.e. what
>> functions take up most CPU.
> I'll add more detail in a bit when we get to 0.9.10, h pa_volume_memchunk
> seems to be a big hitter on arm systems:
Hmm, that function is not optimized in any way, but if I look on its
sources doesn't appear that slow to me either. For each sample we do
one multiplication, one shifting, we appy saturation and then we
increase/decrease poinetrs with wrap around. That shouldn't be that
bad. Also, this code goes once linearly through all samples, which should
minimize influence of the cache.
OTOH this stuff does not use liboil, because liboil doesn't have a
function for saturated multiplication+shifting like this. There's
certainly room for improvement. Patches always welcome.
I assume the data processes is S16NE and the CPU is LE?
does you cpu have any simd-like unit? something that could benefit
from vectorization? something that is supported by gcc's vector extension?
It should be pretty easy to add a special implementation of
pa_volume_memchunk that uses gcc's vector extension.
>> $ opreport -l /usr/bin/pulseaudio
>> warning: /bridgedriver could not be found.
>> CPU: CPU with timer interrupt, speed 0 MHz (estimated)
>> Profiling through timer interrupt
>> samples % image name symbol name
>> 3581 46.4763 libpulsecore.so.5.0.0 pa_volume_memchunk
>> 432 5.6067 libc-2.5.so memcpy
Hmm, can you figure out in which context this is called that often? (i
mean, pa's audio memory management should be mostly zero-copy, so
having such a big hit on memcpy here is surprising to me.
>> 277 3.5951 libm-2.5.so __adddf3
This is interesting, could you figure out the context?
>> 183 2.3751 libpulsecore.so.5.0.0 .plt
>> 176 2.2842 libc-2.5.so strcmp
>> 141 1.8300 libm-2.5.so __muldf3
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the pulseaudio-discuss