All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Binh Q. Pham" <binhpham@cs.rutgers.edu>
To: Gleb Natapov <gleb@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: Performance counters in kvm?
Date: Wed, 13 Nov 2013 22:22:54 -0500	[thread overview]
Message-ID: <5284420E.8070403@cs.rutgers.edu> (raw)
In-Reply-To: <20131113175409.GA2088@redhat.com>

Hi Gleb,
Thanks for the suggestion, but I just tried to specify the cpu type to 
QEMU: -cpu host and I got the same output.

Binh
On 11/13/2013 12:54 PM, Gleb Natapov wrote:
> On Wed, Nov 13, 2013 at 11:52:01AM -0500, Binh Q. Pham wrote:
>> Hi all,
>>
>> I just started using kvm and want to use linux 'perf' tool inside
>> the virtual machine to get some information about the hardware
>> performance counters. I noticed in kvm source, there is pmu.c and
>> pmu-stubs.c, so I assume they provide support for PMU. However, when
>> I ran 'perf stat' in the VM, all hardware events are not supported.
>> Sample screen shot:
>>
>> perf stat /bin/ls
>> Performance counter stats for '/bin/ls':
>> <not supported> cycles
>> <not supported> stalled-cycles-frontend
>> ....
>>
>> Could someone clarify for me if I can use 'perf' in VM with the
>> current kvm state?
>>
> You need to specify host cpu type to QEMU: -cpu host.
>
> --
> 			Gleb.


  reply	other threads:[~2013-11-14  3:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 16:52 Performance counters in kvm? Binh Q. Pham
2013-11-13 17:54 ` Gleb Natapov
2013-11-14  3:22   ` Binh Q. Pham [this message]
2013-11-14  7:16     ` Gleb Natapov
2013-11-14 16:17       ` Binh Q. Pham
2013-11-14 16:46         ` Gleb Natapov
2013-11-14 17:04           ` Binh Q. Pham
2013-11-14 17:21             ` Gleb Natapov
2013-11-14 20:31               ` Binh Q. Pham
2013-11-14 21:08                 ` Gleb Natapov
2013-12-09 18:59                   ` Binh Q. Pham
2013-12-10 10:59                     ` Gleb Natapov
2013-12-10 14:17                       ` Binh Q. Pham

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=5284420E.8070403@cs.rutgers.edu \
    --to=binhpham@cs.rutgers.edu \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.