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: signature.asc
Description: PGP signature

Reply via email to