From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: Questing regarding KVM Guest PMU Date: Sun, 18 Mar 2012 16:50:45 +0200 Message-ID: <20120318145045.GD27306@redhat.com> References: <20120318103020.GA27306@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: shashank rachamalla Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44817 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751933Ab2CROus convert rfc822-to-8bit (ORCPT ); Sun, 18 Mar 2012 10:50:48 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Mar 18, 2012 at 06:27:53PM +0530, 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) wit= h a > >> unit mask of 0x00 (Unhalted core cycles) count 100000 > >> CPU_CLK_UNHALT...| > >> =9Asamples| =9A =9A =9A%| > >> ------------------ > >> =9A =9A =9A =9A1 100.000 /no-vmlinux > >> > >> > > What happens if you run "perf stat -e cycles a.out"? >=20 > This is what i get when I run "perf stat ./a.out" ( with --cpu host > passed in qemu-kvm ) >=20 > Performance counter stats for './a.out': >=20 > 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 >=20 > 0.999846560 seconds time elapsed >=20 > This is without --cpu host ( Note that only software events get moni= tored ) >=20 > Performance counter stats for './a.out': >=20 > 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 >=20 > 0.923182044 seconds time elapsed >=20 > I guess things are working fine with perf. But why not with oprofile = ? >=20 Looks like it. I never tried oprofile. Will try to reproduce your problem and see what oprofile is doing. -- Gleb.