Re: [hatari-devel] Spinloop detection in emulated code

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On tiistai 06 elokuu 2013, Douglas Little wrote:
> The part I want to think about is the VBL marking / instance ordering
> because I don't think it will work as expected due to the lack of a
> stable VBL:FRAME ratio but more significantly, the large number of spins
> which occur on each frame or VBL (some spin sites in my program will
> occur hundreds of times each display frame).

Bad Mood worst frame profiling is based on r_begin label, there
VBL count will just give some indication on whether some loop in
"top 10 spinner" list for the worst frame was at start or at end
of the long Bad Mood frame.


> There is probably a better
> way to identifty/sort them, perhaps by a combination of 'user frame'
> (e.g. r_begin label) the global cycle counter since CPU/DSP are in
> lockstep... so both sides of the spin could be identified as a single
> cooperation...

The save file will list all active spinloops, so one can check
it from there.  When you see a spinloop in the top list, you can
just grep its address or count from the save file (with some
context using "grep -C<lines>").

If CPU and DSP spins are after each other, the address and instruction
info hopefully give enough clues on whether they're part of the same
operation.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/