linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: "linux-perf-users@vger.kernel.org"
	<linux-perf-users@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: perf, H/W counters - ESX hosted VM
Date: Fri, 27 May 2011 13:33:54 -0600	[thread overview]
Message-ID: <4DDFFCA2.8030100@gmail.com> (raw)


Has anyone successfully used perf within an ESX VM? dmesg shows a PMU is
discovered:

dmesg | grep -i performance
Performance Events: Nehalem/Corei7 events, Intel PMU driver.

yet data from it is nonsensical:

perf stat -v -- /tmp/a

task-clock-msecs: 20593318 20593318 20593318
context-switches: 2 20593318 20593318
CPU-migrations: 0 20593318 20593318
page-faults: 387 20593318 20593318
cycles: 10737418235 20593318 20593318
instructions: 10737418235 20593318 20593318
cache-references: 10737418235 20593318 20593318
cache-misses: 10737418235 20593318 20593318

 Performance counter stats for '/tmp/a':

      20.593318  task-clock-msecs         #      0.988 CPUs
              2  context-switches         #      0.000 M/sec
              0  CPU-migrations           #      0.000 M/sec
            387  page-faults              #      0.019 M/sec
    10737418235  cycles                   # 521403.022 M/sec
    10737418235  instructions             #      1.000 IPC
    10737418235  cache-references         # 521403.022 M/sec
    10737418235  cache-misses             # 521403.022 M/sec

    0.020837863  seconds time elapsed

David

/tmp/a  -- a step above 'sleep 1'

#!/bin/sh

declare -i i=0;
declare -i sum=0;
while [ $i -lt 1000 ]
do
	sum=$((sum + i))
    i=$((i+1))
done
echo "sum $sum"

             reply	other threads:[~2011-05-27 19:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 19:33 David Ahern [this message]
2011-05-27 22:51 ` perf, H/W counters - ESX hosted VM Arun Sharma

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=4DDFFCA2.8030100@gmail.com \
    --to=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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).