qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Smolov <smolov@ispras.ru>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] emulation cycle number implementation
Date: Fri, 08 Sep 2017 10:41:59 +0300	[thread overview]
Message-ID: <59B249C7.2000400@ispras.ru> (raw)
In-Reply-To: <CAFEAcA-QP7J_Rjre_RmwuYFnBU84gPFXuH4efeSddwgXhgq5Vg@mail.gmail.com>


On 07.09.2017 19:37, Peter Maydell wrote:
> On 7 September 2017 at 17:30, Sergey Smolov <smolov@ispras.ru> 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	other threads:[~2017-09-08  7:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 16:30 [Qemu-devel] emulation cycle number implementation Sergey Smolov
2017-09-07 16:37 ` Peter Maydell
2017-09-08  7:41   ` Sergey Smolov [this message]
2017-09-08  9:07     ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59B249C7.2000400@ispras.ru \
    --to=smolov@ispras.ru \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).