From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Questing regarding KVM Guest PMU Date: Sun, 18 Mar 2012 16:50:18 +0200 Message-ID: <4F65F62A.5020109@redhat.com> References: <20120318103020.GA27306@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm@vger.kernel.org To: shashank rachamalla Return-path: Received: from mx1.redhat.com ([209.132.183.28]:61553 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751933Ab2CROuW (ORCPT ); Sun, 18 Mar 2012 10:50:22 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 03/18/2012 02:57 PM, shashank rachamalla wrote: > 2012/3/18 Gleb Natapov : > > On Sun, Mar 18, 2012 at 03:48:53PM +0530, shashank rachamalla wrote: > >> > >> CPU: Core 2, speed 2200.19 MHz (estimated) > >> Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a > >> unit mask of 0x00 (Unhalted core cycles) count 100000 > >> CPU_CLK_UNHALT...| > >> samples| %| > >> ------------------ > >> 1 100.000 /no-vmlinux > >> > >> > > What happens if you run "perf stat -e cycles a.out"? > > This is what i get when I run "perf stat ./a.out" ( with --cpu host > passed in qemu-kvm ) > > Performance counter stats for './a.out': > > 954.925996 task-clock-msecs # 0.955 CPUs > 23 context-switches # 0.000 M/sec > 0 CPU-migrations # 0.000 M/sec > 93 page-faults # 0.000 M/sec > 2110635735 cycles # 2210.261 M/sec > 901816391 instructions # 0.427 IPC > 247677 cache-references # 0.259 M/sec > 15044 cache-misses # 0.016 M/sec > > 0.999846560 seconds time elapsed > > This is without --cpu host ( Note that only software events get monitored ) > > Performance counter stats for './a.out': > > 913.826372 task-clock-msecs # 0.990 CPUs > 13 context-switches # 0.000 M/sec > 0 CPU-migrations # 0.000 M/sec > 93 page-faults # 0.000 M/sec > cycles > instructions > cache-references > cache-misses > > 0.923182044 seconds time elapsed > > I guess things are working fine with perf. But why not with oprofile ? > > What kernel are you using in the guest? IIRC oprofile is using perf for its data source, but perhaps this wasn't tree in older kernels. -- error compiling committee.c: too many arguments to function