Re: [hatari-devel] Bogus profiler CPU cycles values

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


Hi,

On perjantai 15 helmikuu 2013, Nicolas Pomarède wrote:
> I'm not sure that the code as it is now is the best way to measure the
> number of cycles spent in the DSP.
> 
> So far, CYCLES_COUNTER_CPU is only used for the dsp cycles, so resetting
> it has no side effect.
> 
> But from a "semantic" point of view, CYCLES_COUNTER_CPU should be IMO a
> global counter that never resets and permanently increments (for this to
> be correct it should be 64 bit, not 32 bit). This counter would count
> all cpu cycles since previous cold/warm reset.
> 
> So, to count cycles between 2 points, it would be better to subtract the
> 2 consecutive values of Cycles_GetCounter(CYCLES_COUNTER_CPU).
> 
> At the moment, this is not the case, so I think you can remove the 'if'
> if you want ; but in a few months, when other more important parts are
> fixed, I think we will have to change this and you will have to update
> your code, but this shouldn't be a big change.

Ok, in that case I'll have the if in profiler itself and remove it
when the code in CPU cores is fixed.

When that change is done, cycle counter usage should be added also to
the MMU CPU core version...


	- Eero




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