Re: [hatari-devel] WinUAE CPU core zero cycles

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


Hi Eero,

What are you looking at ?

I've done a little trace in a program and I get :

cpu video_cyc= 304 304@ 0 : $e0f3c0 : 4a2d fead tst.b $fead(a5) cpu video_cyc= 310 310@ 0 : $e0f3c4 : 6628 bne.s $e0f3ee cpu video_cyc= 314 314@ 0 : $e0f3c6 : 08ad 0000 feac bclr #0,$feac(a5) cpu video_cyc= 324 324@ 0 : $e0f3cc : 6720 beq.s $e0f3ee cpu video_cyc= 330 330@ 0 : $e0f3ee : 4e75 rts cpu video_cyc= 338 338@ 0 : $e00d0e : 4cdf 0180 movem.l (sp)+,d7-d7/a0 cpu video_cyc= 352 352@ 0 : $e00d12 : 51cf ffec dbra d7,$e00d00 cpu video_cyc= 358 358@ 0 : $e00d00 : 2258 movea.l (a0)+,a1
[...]
cpu video_cyc= 30392 184@ 59 : $e00dac : 3200 move.w d0,d1 cpu video_cyc= 30394 186@ 59 : $e00dae : e549 lsl.w #2,d1
[...]

I can see when tracing some code that the 68030 generates some cycles. (cyc= increase as it should)

What is the problem ?

Laurent





Le 20/02/2013 09:39, Eero Tamminen a écrit :
Hi,

On keskiviikko 20 helmikuu 2013, Laurent Sallafranque wrote:
Just a little question before I start to search, do you use cycle exact
+ MMU ?
No, as cycles counter doesn't work with MMU core.  This was with
the default Falcon/WinUAE CPU core.


	- Eero

If yes, I think when Thomas added the MMU in a new core, he didn't take
into account the cycles values I added for the 68030 CPU.

If that's the case, would you please make the test again but without the
MMU core ?

Regards

Laurent

Le 19/02/2013 22:08, Eero Tamminen a écrit :
Hi,

On tiistai 19 helmikuu 2013, laurent.sallafranque@xxxxxxx wrote:
Eero, can you tell me which instructions return 0 cycles ?

I know I didn't finish the job for Fpu and MMU instructions, but if
the instructions you speak about are in the 68030 CPU, I'd be
interrested.
This is from TOS v4.x bootup:
$e3ddc4 : 3047                                 movea.w   d7,a0
inf% (3, 0, 0)
$e4929c : c042                                 and.w     d2,d0
inf% (9, 0, 0)
$e4929c : c042                                 and.w     d2,d0
inf% (10, 0, 0)
$e4929c : c042                                 and.w     d2,d0
inf% (11, 0, 0)
$e4929c : c042                                 and.w     d2,d0
inf% (12, 0, 0)
$e490ec : 7200                                 moveq     #0,d1
inf% (1, 0, 0)
$e490f4 : 7400                                 moveq     #0,d2
inf% (1, 0, 0)
$e25bf4 : 7218                                 moveq     #$18,d1
inf% (3, 0, 0)
$e25c20 : c041                                 and.w     d1,d0
inf% (3, 0, 0)
$e1fb30 : 200d                                 move.l    a5,d0
inf% (5, 0, 0)
$e1fa54 : 200c                                 move.l    a4,d0
inf% (5, 0, 0)
$e1fb30 : 200d                                 move.l    a5,d0
inf% (6, 0, 0)
$e25bf4 : 7218                                 moveq     #$18,d1
inf% (4, 0, 0)
$e25c20 : c041                                 and.w     d1,d0
inf% (4, 0, 0)
$e1fa54 : 200c                                 move.l    a4,d0
inf% (6, 0, 0)

This from latest EmuTOS CVS snapshot bootup on Falcon mode:
$e0b912 : 5242                                 addq.w    #1,d2
0.00% (6, 0, 0)
$e0dd1c : b042                                 cmp.w     d2,d0
0.00% (1, 0, 0)
$e0dc1c : 3801                                 move.w    d1,d4
0.00% (1, 0, 0)
$e0dc44 : 3608                                 move.w    a0,d3
0.00% (1, 0, 0)
$e05854 : c001                                 and.b     d1,d0
0.00% (1, 0, 0)
$e0589e : 8001                                 or.b      d1,d0
0.00% (1, 0, 0)
$e05f64 : d082                                 add.l     d2,d0
0.00% (1, 0, 0)
$e05f62 : 2002                                 move.l    d2,d0
0.00% (2, 2, 1)
...
$e0dd1c : b042                                 cmp.w     d2,d0
0.00% (56, 28, 0)
$e139d4 : 2245                                 movea.l   d5,a1
0.00% (1, 0, 0)
$e136e4 : 3800                                 move.w    d0,d4
0.00% (1, 0, 0)
$e13a48 : 4443                                 neg.w     d3
0.00% (75, 0, 0)

I.e. it's the basic instructions which would seem to have problems

with cycles counter:
	move, neg. or, and, add, cmp...

The interesting thing is that some of them (at least add, move, cmp)
have cycles sometimes.

As debugger is called right before DSP and DSP uses the same call to
get cycles, CPU vs. DSP ratio is most likely pretty bogus because of
this. :-/


If you want to see the same output, update to latest Hatari version,

change DEBUG in start of src/debug/profile.c to 1 and do:
	echo "profiling on" > profile.ini
	hatari --parse profile.ini --machine falcon --tos tos404.img
	
	
	- Eero







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