From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: Unable to use perf in VM
Date: Wed, 30 Nov 2016 11:48:37 +0000 [thread overview]
Message-ID: <8b2a3cfd-57a0-70ac-ef50-672f8040291d@arm.com> (raw)
In-Reply-To: <70374841-ecb1-a6c3-ed43-0f39e2d5fec2@riken.jp>
+ Shannon
On 29/11/16 22:04, Itaru Kitayama wrote:
> Hi,
>
> In a VM (virsh controlled, KVM acceleration enabled) on a recent
> kvmarm kernel host, I find I am unable to use perf to obtain
> performance statistics for a complex task like kernel build.
> (I've verified this is seen with a Fedora 25 VM and host combination
> as well)
> APM folks CC'ed think this might be caused by a bug in the core PMU
> framework code, thus I'd like to have experts opinion on this issue.
>
> [root at localhost linux]# perf stat -B make
> CHK include/config/kernel.release
> [ 119.617684] git[1144]: undefined instruction: pc=fffffc000808ff30
> [ 119.623040] Code: 51000442 92401042 d51b9ca2 d5033fdf (d53b9d40)
> [ 119.627607] Internal error: undefined instruction: 0 [#1] SMP
[...]
In a VM running mainline hosted on an AMD Seattle box:
Performance counter stats for 'make':
1526089.499304 task-clock:u (msec) # 0.932 CPUs utilized
0 context-switches:u # 0.000 K/sec
0 cpu-migrations:u # 0.000 K/sec
29527793 page-faults:u # 0.019 M/sec
2913174122673 cycles:u # 1.909 GHz
2365040892322 instructions:u # 0.81 insn per cycle
<not supported> branches:u
32049215378 branch-misses:u # 0.00% of all branches
1637.531444837 seconds time elapsed
Running the same host kernel on a Mustang system, the guest explodes
in the way you reported. The failing instruction always seems to be
an access to pmxevcntr_el0 (I've seen both reads and writes).
Funnily enough, it dies if you try any HW event other than cycles
("perf stat -e cycles ls" works, and "perf stat -e instructions ls"
explodes). Which would tend to indicate that we're screwing up
the counter selection, but I have no proof of that (specially that
the Seattle guest is working just as expected).
Shannon, any idea?
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2016-11-30 11:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 22:04 Unable to use perf in VM Itaru Kitayama
2016-11-30 11:48 ` Marc Zyngier [this message]
2016-11-30 13:37 ` Marc Zyngier
2016-11-30 19:17 ` Wei Huang
2016-12-01 9:16 ` Marc Zyngier
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=8b2a3cfd-57a0-70ac-ef50-672f8040291d@arm.com \
--to=marc.zyngier@arm.com \
--cc=linux-arm-kernel@lists.infradead.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