Re: [hatari-devel] Feature request/idea: cycle counting

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


Just enable profiling before you run the code, and you have the info
in the disassembly:
Wow, this is new. How I could forget this!?

> profile addresses
# disassembly with profile data: <instructions percentage>% (<sum of instructions>, <sum of cycles>, <sum of i-cache misses>, <sum of d-cache hits>)
$00e007a2 : cmpi.w    #$73,d0  0.53% (10311, 0, 0, 0)
$00e007a6 : bne.s     $e007b0  0.53% (10311, 68795, 3453, 0) 
$00e007a8 : jsr       $e43ed8  0.53% (10311, 240558, 20622, 0)
$00e007ae : rte                0.53% (10311, 309330, 20622, 13748)
I don't really understand this output. I see four instructions but the 'sum of instructions' is always the same? How so? Also the cycles look quite strange, so it's 0 cycles, 68795 cycles, 240558 cycles? I guess it represents the overall statistics for each instruction for the whole session but still I can't quite figure out what those numbers mean.
 

Only difference between these two commands is that "d" command is
missing the explanatory heading, and it lists also instructions
that haven't been run i.e. which are lacking the cycle information.
Man, this is nearly exactly what I've been after. So many hidden corners. :)

If you want cycles for just one loop round, set breakpoints
so that it gets run only once each time you continue.
Actually you're right. This could be a way to go, thanks (assuming I'll get the meaning of the numbers above ;)).

--
MiKRO / Mystic Bytes
http://mikro.atari.org


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