Re: [hatari-devel] WinUAE and 030 cache hits/misses?

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


Hi,

On maanantai 21 tammikuu 2013, laurent.sallafranque@xxxxxxx wrote:
> Yes, this would be fine, also for cycles timings counting.
> I don't know if a global variable is the best way to do it

Hm. At least I could experiment with global variable, to see
whether any misses are reported...

There are already quite a lot of global variables in regards to
current instruction CPU is handling, for example CurrentInstrCycles
and nWaitStateCycles.

Maybe cleaner would be to move all these variables to a global
struct, e.g. something like this:

	/* information about current instrcution */
	struct {
		int instrCycles;
		int waitStateCycles;
		bool iCacheMiss;
	} CpuState;
?


> or changing the functions to return the state, but we need this
> information.

fill_cache*() functions are called by get_word_ce*_prefetch()
functions of which the appropriate one is mapped to x_prefetch()
function pointer and already returns the opcode.

Were you thinking of returning a struct instead, or passing
prefetch functions a pointer to bool which can be updated?

That would then need to be passed in m68k_run_*() functions:
 -> do_specialties() -> DebugCpu_Check() -> profiling function

Nothing else in the debugger besides profiler has any use for
this info though.


At this point it would be much better if the passed information
would be a pointer to some struct that contains also the other
required info and that struct would be used & passed to all
functions requiring such info.


> For the cycles counting, in terms of timings, what is the difference
> between an instruction miss and hits ?

Cache miss = Instruction pipeline stall and access to CPU-external RAM...
How much faster CPU internal cache access is to access to RAM?


	- Eero



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