qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Yuxin Ren <ryx@gwmail.gwu.edu>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] how to monitor vm exit
Date: Thu, 15 Sep 2016 11:34:52 +0100	[thread overview]
Message-ID: <20160915103452.GE4214@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAAKbDre787pQbFeAmF0C20vYm=ozOZxfK1+bzrrNc5YueNcJHw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 958 bytes --]

On Fri, Sep 02, 2016 at 12:15:57AM +0800, Yuxin Ren wrote:
> 1. How can I track how many vm exit happens during vm execution using
> KVM under Ubuntu?

$ sudo perf record -a -e kvm:kvm_exit
...^C
$ sudo perf report
Samples: 37K of event 'kvm:kvm_exit', Event count (approx.): 37736
Overhead  Trace output
  49.61%  reason IO_INSTRUCTION rip 0x15505 info 610048 0
   8.28%  reason IO_INSTRUCTION rip 0xee8c9 info 4020000 0
   2.32%  reason CR_ACCESS rip 0x656 info 0 0
   2.32%  reason CR_ACCESS rip 0x66d info 0 0
   2.30%  reason IO_INSTRUCTION rip 0xe702 info 920048 0
   2.30%  reason IO_INSTRUCTION rip 0xe71c info 920040 0

There are other tools that can do similar things like trace-cmd or raw
ftrace.

The kvm_stat tool is also good but I don't know if it's packaged for
Ubuntu:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/sect-Troubleshooting-kvm_stat.html

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

      reply	other threads:[~2016-09-15 10:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 16:15 [Qemu-devel] how to monitor vm exit Yuxin Ren
2016-09-15 10:34 ` Stefan Hajnoczi [this message]

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=20160915103452.GE4214@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ryx@gwmail.gwu.edu \
    /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).