qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Steffen Liebergeld <usenet@gmx.eu>
Subject: Re: [Qemu-devel] Precise guest instruction count.
Date: Tue, 10 Mar 2009 01:55:22 +0000	[thread overview]
Message-ID: <200903100155.22875.paul@codesourcery.com> (raw)
In-Reply-To: <gp2o2g$k18$1@ger.gmane.org>

> So my question is how can I get accurate guest instruction count number?

-icount maintains an accurate count of the number of instructions executed. 
However for performance reasons the counter value is not valid at all times.

Also note that you can not assume that a whole TB is executed (because of MMU 
faults, or IO interrupts).

Even with -icount, qemu is only deterministic internally. Its behavior can 
still be influenced by external events. In usermode this could be any 
syscall. In system mode this could be mouse/keyboard input, modified disk 
images or network traffic (possibly other things I've missed).

If you need counts of specific instructions then you probably need to add 
explicit counters to the implementation of those instructions.

Paul

  parent reply	other threads:[~2009-03-10  1:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-09  9:38 [Qemu-devel] Precise guest instruction count Steffen Liebergeld
2009-03-09 21:56 ` Laurent Desnogues
2009-03-11 10:33   ` [Qemu-devel] " Steffen Liebergeld
2009-03-11 10:42     ` Laurent Desnogues
2009-03-11 12:53       ` Steffen Liebergeld
2009-03-11 13:13         ` Paul Brook
2009-03-10  1:55 ` Paul Brook [this message]
2009-03-11 11:45   ` Steffen Liebergeld

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=200903100155.22875.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    --cc=usenet@gmx.eu \
    /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).