* Can perf be used to record cycles or instructions on Virtual Machine
@ 2013-06-26 19:13 Peipei Wang
2013-06-26 19:20 ` David Ahern
0 siblings, 1 reply; 2+ messages in thread
From: Peipei Wang @ 2013-06-26 19:13 UTC (permalink / raw)
To: perf group
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?
Thanks for all your help.
Yours,
Wang Peipei
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Can perf be used to record cycles or instructions on Virtual Machine
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
0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2013-06-26 19:20 UTC (permalink / raw)
To: Peipei Wang; +Cc: perf group
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-26 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).