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

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


Hi,

On 01/30/2018 04:03 AM, Miro Kropáček wrote:
I've been having this idea to create my own cycle counter and just
yesterday I've realised that Hatari can do that for me with nearly zero
effort. :)

The idea is that you have a m68k code in memory, disassemble it and you see
not only each instruction's size but also cycles it eats. And since it
would be in Hatari, you could immediately calculate whether it's a cache
hit/miss, influence of the instruction head/tail, literally anything needed.
>
Since Hatari already tries to calculate Falcon's bus activity and CPU
cycles, how hard this would be? Virtually just one more column with the
cycles number and some indication about instr/data cache state.

Hatari already provides that info:
https://hg.tuxfamily.org/mercurialroot/hatari/hatari/raw-file/tip/doc/manual.html#Investigating_the_profile_data


For Bad Mood, I had done Hatari debugger scripts which automatically
find out the frames that are heaviest in regards to CPU instruction
and DSP instruction[1] count wise, and automatically profile them &
provide call-graphs for those.

Those scripts could have done that also based on cycle counts,
but back then Hatari didn't yet have good enough cache emulation
so I trusted instruction counts more.

(Scripts for that are included to Bad Mood sources.  All one needed
to do, is make a recording of Doom I / II game play and specify that
on the Bad Mood command line, to automatically get separate CPU & DSP
callgraphs of the heaviest frames during game startup & actual game
play.)


	- Eero



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