qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] emulation cycle number implementation


From: Peter Maydell
Subject: Re: [Qemu-devel] emulation cycle number implementation
Date: Fri, 8 Sep 2017 10:07:16 +0100

On 8 September 2017 at 08:41, Sergey Smolov <address@hidden> wrote:
> But what if I like to track guest hardware cycles? I run the same program on
> QEMU and RTL model of MIPS microprocessor, and I want to compare simulation
> traces. I expect, that emulation will start from 0 tick in both cases, at
> least.

Broadly, you can't, because QEMU is not a cycle accurate emulator.
(For 21st century CPUs, cycle accurate emulation that isn't just
"run the RTL" is pretty near to impossible for practical purposes
anyway.) If you're using QEMU's icount mode then cpu_get_ticks()
will I think get you number of instructions executed; that's as
good as you're going to get, I'm afraid.

Last time I wanted to do comparison of simulation traces I just
compared the sequence of instructions executed, without worrying
about trying to compare against the other simulation's notional
clock cycle count as well.

thanks
-- PMM



reply via email to

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