From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: use perf to get LLC-loads count in Guest Date: Wed, 19 Dec 2012 17:47:34 +0200 Message-ID: <20121219154734.GB17584@redhat.com> References: <20121219124920.GQ11016@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Storm Wang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:9214 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753703Ab2LSPrh (ORCPT ); Wed, 19 Dec 2012 10:47:37 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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 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.