* Re: use perf to get LLC-loads count in Guest
[not found] <CADN=SKGHgePSsVNkZZ566Ue-en37ica-MscPwffOw_TeZ5K0GQ@mail.gmail.com>
@ 2012-12-19 12:49 ` Gleb Natapov
2012-12-19 15:17 ` Storm Wang
0 siblings, 1 reply; 4+ messages in thread
From: Gleb Natapov @ 2012-12-19 12:49 UTC (permalink / raw)
To: Storm Wang; +Cc: kvm
On Wed, Dec 19, 2012 at 02:08:07AM +0800, Storm Wang wrote:
> Hello guys
>
> here I have a problem, when I used perf in Guest, the count of LLC-loads
> usually returns 0. LLC-loads was a hardware cache event, besides the
> setting of general PMU MSR, need to set MSR_OFFCORE_RSP_0 as well, in perf,
> it would be the extra_reg and extra_config in "hw_perf_event". I add some
> debuginfo in function "read_pmc" and found that when measuring LLC-loads,
> pmc->perf_event->hw.extra_reg is 0x0, and the counter's number was always
> the same. I think this is the reason, but I can't find when and where the
> value changed.
>
> Anybody has some idea for this?
>
Currently counters that need extra regs are not supported by KVM PMU
emulation.
--
Gleb.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: use perf to get LLC-loads count in Guest
2012-12-19 12:49 ` use perf to get LLC-loads count in Guest Gleb Natapov
@ 2012-12-19 15:17 ` Storm Wang
2012-12-19 15:47 ` Gleb Natapov
0 siblings, 1 reply; 4+ messages in thread
From: Storm Wang @ 2012-12-19 15:17 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm
>Currently counters that need extra regs are not supported by KVM PMU
>emulation
Thank you, Gleb. But actually only 1% chance, I got the LLC-loads
count nonzero, I really have no idea why this happend.
On Wed, Dec 19, 2012 at 8:49 PM, Gleb Natapov <gleb@redhat.com> wrote:
> On Wed, Dec 19, 2012 at 02:08:07AM +0800, Storm Wang wrote:
>> Hello guys
>>
>> here I have a problem, when I used perf in Guest, the count of LLC-loads
>> usually returns 0. LLC-loads was a hardware cache event, besides the
>> setting of general PMU MSR, need to set MSR_OFFCORE_RSP_0 as well, in perf,
>> it would be the extra_reg and extra_config in "hw_perf_event". I add some
>> debuginfo in function "read_pmc" and found that when measuring LLC-loads,
>> pmc->perf_event->hw.extra_reg is 0x0, and the counter's number was always
>> the same. I think this is the reason, but I can't find when and where the
>> value changed.
>>
>> Anybody has some idea for this?
>>
> Currently counters that need extra regs are not supported by KVM PMU
> emulation.
>
> --
> Gleb.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: use perf to get LLC-loads count in Guest
2012-12-19 15:17 ` Storm Wang
@ 2012-12-19 15:47 ` Gleb Natapov
0 siblings, 0 replies; 4+ messages in thread
From: Gleb Natapov @ 2012-12-19 15:47 UTC (permalink / raw)
To: Storm Wang; +Cc: kvm
On Wed, Dec 19, 2012 at 11:17:53PM +0800, Storm Wang wrote:
> >Currently counters that need extra regs are not supported by KVM PMU
> >emulation
> Thank you, Gleb. But actually only 1% chance, I got the LLC-loads
> count nonzero, I really have no idea why this happend.
>
May be without configuring MSR_OFFCORE_RSP_0 the counter still counts
something.
> On Wed, Dec 19, 2012 at 8:49 PM, Gleb Natapov <gleb@redhat.com> wrote:
> > On Wed, Dec 19, 2012 at 02:08:07AM +0800, Storm Wang wrote:
> >> Hello guys
> >>
> >> here I have a problem, when I used perf in Guest, the count of LLC-loads
> >> usually returns 0. LLC-loads was a hardware cache event, besides the
> >> setting of general PMU MSR, need to set MSR_OFFCORE_RSP_0 as well, in perf,
> >> it would be the extra_reg and extra_config in "hw_perf_event". I add some
> >> debuginfo in function "read_pmc" and found that when measuring LLC-loads,
> >> pmc->perf_event->hw.extra_reg is 0x0, and the counter's number was always
> >> the same. I think this is the reason, but I can't find when and where the
> >> value changed.
> >>
> >> Anybody has some idea for this?
> >>
> > Currently counters that need extra regs are not supported by KVM PMU
> > emulation.
> >
> > --
> > Gleb.
--
Gleb.
^ permalink raw reply [flat|nested] 4+ messages in thread
* use perf to get LLC-loads count in Guest
@ 2012-12-19 4:26 Storm Wang
0 siblings, 0 replies; 4+ messages in thread
From: Storm Wang @ 2012-12-19 4:26 UTC (permalink / raw)
To: kvm
Hello,
I have a problem when I used perf in Guest, the count of LLC-loads
almost always returns 0.
LLC-loads was a hardware cache event, besides the setting of general
PMU MSR, need to set MSR_OFFCORE_RSP_0 as well, in perf, it would be
the extra_reg and extra_config in "hw_perf_event". I add some
debuginfo in function "read_pmc" and found that when measuring
LLC-loads, pmc->perf_event->hw.extra_reg is 0x0, and the counter's
number was always the same. I think this is the reason, but I can't
find when and where the value changed.
Anybody has some idea for this?
my environment:
CPU was Xeon E5620, 2.4GHz
centos 6.3 for both Host and Guest and "-cpu host" option was added
when start qemu.
I tried both the original kernel of centos6.3 and the latest stable
version 3.7.1
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-19 15:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CADN=SKGHgePSsVNkZZ566Ue-en37ica-MscPwffOw_TeZ5K0GQ@mail.gmail.com>
2012-12-19 12:49 ` use perf to get LLC-loads count in Guest Gleb Natapov
2012-12-19 15:17 ` Storm Wang
2012-12-19 15:47 ` Gleb Natapov
2012-12-19 4:26 Storm Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox