linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Covington <cov@codeaurora.org>
To: Jueyuan Zhu <jueyuan.zhu@gmail.com>, linux-perf-users@vger.kernel.org
Subject: Re: How to measure VM events using perf-event
Date: Fri, 10 Apr 2015 11:39:31 -0400	[thread overview]
Message-ID: <5527EEB3.1060507@codeaurora.org> (raw)
In-Reply-To: <37CC8A17-BF41-41A5-8890-83A792C0BC08@gmail.com>

Hi Jueyuan,

On 04/09/2015 11:46 PM, Jueyuan Zhu wrote:
> Hello,
> 
> I am trying to use the perf-event to measure the events for one specified
> VM in KVM platform. Since each VM is just a process in the host OS, so I thought
> we could just set the process id of this VM in the perf-event_open API to
> count the events. The following is my code (based on the example from
> perf_event_open linux manual). 

> However, this program’s output keeps constant whenever this VM is idle, or
> running different benchmarks. So it seems the event counting is incorrect. Can
> anyone tell me how to set the flags or perf_event_attr to correctly count the
> VM events using perf_event_open? 

You may want to check that the QEMU or kvmtool you're using correctly
virtualizes or emulates the PMU for your architecture. Information about this
might be in the documentation or release notes or if not you could try asking
on the QEMU or kvmtool mailing list tool.

Chris

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-04-10 15:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10  3:46 How to measure VM events using perf-event Jueyuan Zhu
2015-04-10 15:39 ` Christopher Covington [this message]
2015-04-10 16:17   ` Jueyuan Zhu
2015-04-10 16:57     ` Christopher Covington
2015-04-11  2:45     ` Tianwei Zhang
2015-04-11 11:59     ` Arnaldo Carvalho de Melo

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=5527EEB3.1060507@codeaurora.org \
    --to=cov@codeaurora.org \
    --cc=jueyuan.zhu@gmail.com \
    --cc=linux-perf-users@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 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).