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: Sergey Smolov
Subject: Re: [Qemu-devel] emulation cycle number implementation
Date: Fri, 08 Sep 2017 10:41:59 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0


On 07.09.2017 19:37, Peter Maydell wrote:
On 7 September 2017 at 17:30, Sergey Smolov <address@hidden> wrote:
I'm running MIPS assembler programs on QEMU. I need to log some events that
happen through emulation (writes to some registers, for example). When an
event happens, I need to print not only the event-related information, but
an "emulation cycle number" also. This number should be an integer
increasing value that is similar to real hardware clock.

How to implement this in QEMU? May QEMU timers be helpful in solving such a
problem?
You can use cpu_get_ticks(), though if we're not in icount mode
you may find it doesn't behave quite as helpfully as you might like
(in that case it roughly tracks host hardware cycles.)

thanks
-- PMM

Thank you, Peter!

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.

--
Sincerely yours,
Sergey Smolov




reply via email to

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