From: David Ahern <dsahern@gmail.com>
To: Peipei Wang <wangpeipei.90@gmail.com>
Cc: perf group <linux-perf-users@vger.kernel.org>
Subject: Re: Can perf be used to record cycles or instructions on Virtual Machine
Date: Wed, 26 Jun 2013 13:20:50 -0600 [thread overview]
Message-ID: <51CB3F12.4030206@gmail.com> (raw)
In-Reply-To: <CAEuYUeoCAOJAP4xvKWsFf4e-VJ0BuooO=i8_1qadva-1YFii5w@mail.gmail.com>
On 6/26/13 1:13 PM, Peipei Wang wrote:
> Hi, all.
> I got a new problem.
>
> When I use perf to get CPI( cycles per instruction) on a Virtual
> Machine, I receive the message that
> cycles and instructions are not supported.
>
> However, other events like page-faults or context-switches can be
> supported well.
> I don't know why. So I guess I can't user perf to record a certain
> sort of performance events on Virtual Machine.
>
> Is my guess correct?? What kind of performance events in hell aren't
> supported?
KVM supports a virtual PMU which uses perf_events host side. I believe
it went into v3.2, so a host kernel version of 3.2 and greater will have it.
You also need an updated qemu version to set the cpuid bits. I forget
which version exactly - 1.2 should work.
David
prev parent reply other threads:[~2013-06-26 19:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 19:13 Can perf be used to record cycles or instructions on Virtual Machine Peipei Wang
2013-06-26 19:20 ` David Ahern [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=51CB3F12.4030206@gmail.com \
--to=dsahern@gmail.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=wangpeipei.90@gmail.com \
/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).