qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 5/5] arm: Simplify cycle counter


From: Peter Maydell
Subject: Re: [Qemu-devel] [RFC 5/5] arm: Simplify cycle counter
Date: Thu, 30 Apr 2015 23:02:27 +0100

On 30 April 2015 at 22:33, Christopher Covington
<address@hidden> wrote:
> On Apr 30, 2015 2:28 PM, "Peter Maydell" <address@hidden> wrote:
>> Are you really really sure the _raw function is the correct one?
>> Nowhere else in the codebase calls it except the other wrappers
>> in cpu.c which provide a sane view of the instruction count...
>> (I suspect cpu_get_icount_raw() should really be static.)
>
> I thought it wasn't being used because it was new, having been introduced by
> Pavel Dovgalyuk's determinism patches.
>
> When you talk about sanity, what would this patch make insane? The
> instructions per second and cycles per second that would result? If so, what
> if seconds/timer ticks were changed in the same patch to be derived from the
> instruction count. All of this could potentially only apply with -icount
> specified.

I don't really know for certain how the code here works, but
it makes me very dubious when I see a function that is being
used literally nowhere else in any other target CPU, and
where every other code path to it goes via taking a lock.

Paolo: can you suggest what the right function to call to implement
a cycle counter is?

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]