From: Jonathan C. R. <jon...@ba...> - 2004-04-25 20:19:59
|
On Wed, 2004-04-21 at 02:12, Benjamin Herrenschmidt wrote: > On Tue, 2004-04-20 at 22:00, Bernard Leach wrote: > > > What we really need though is some kind of profiling on memory usage for the > > decoder. Perhaps something like the Armulator does this (or could be > > modified). If we knew a little more about the memory usage pattern then it > > would be easier to optimise usage of the fast ram. > > Also, the ARM ABI isn't very stack intensive (at least not as much as > m68k is) but it may still be a good optimisation to put the decoder > stack in the fastest memory type you have. > Hi Benjamin, I've been looking at the libmad code, and an awful lot of the calculation seems to take place on the stack... Your idea seems very good to me. How does one go about putting the stack somewhere else? I tried hacking an ld script but I must confess I'm a bit stuck... Either I don't understand the scripts at all, or arm-elf-ld doesn't like being told what to do. The same goes for moving some code: after profiling on an i386, I tried using __attribute__ to put some code on the on-board memory, to no avail. On the up-side, I've managed to reduce the audio buffer in my kernel to 16k, and have noticed a bit of speed-up from 'allocating' the libmad data structures after 0x4000800C. I guess playback is around 95% speed now. Cheers, Jonathan |