Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Profiling the codecs

Re: Profiling the codecs

From: Tomasz Malesinski <tmal_at_mimuw.edu.pl>
Date: Sun, 4 Feb 2007 20:01:50 +0100

> I notice that on mpa 5.7 and on vorbis a whopping 7.3% of CPU time is
> spent in switch_thread. Can you by chance try turning off priority
> scheduling and see how that impacts those percentages? That seems like
> an awefully high scheduling overhead.

I tried switching off HAVE_PRIORITY_SCHEDULING in
firmware/export/config.h and it doesn't make a big difference. With
mp3 playing, the number of cycles spent in switch_thread decreased
from 14.5M to 13.5M. When I slowed down the audio DMA in the emulator,
so that the codec thread had to wait once in a while for space in the
audio buffer, the number of cycles spent in switch_thread increased to
36M with no priority scheduling and 41M with it.

My benchmark is simply the boot process and playing 5s of audio (it
happens automaticaly, I play the song instead of calling browse_root
in apps/main.c). I haven't traced where most of switch_thread calls
come from.

-- 
Tomek Malesinski
Received on 2007-02-04

Page was last modified "Jan 10 2012" The Rockbox Crew
aaa