From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Wiki docs on counting and tracing KVM perf events Date: Thu, 20 May 2010 14:10:57 +0300 Message-ID: <4BF518C1.60304@redhat.com> References: <4BEC1345.7040408@redhat.com> <4BF4EF97.5060705@redhat.com> <4BF4F07F.4020007@redhat.com> <4BF4F1D1.6030203@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Jes Sorensen , kvm To: Stefan Hajnoczi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753062Ab0ETLLB (ORCPT ); Thu, 20 May 2010 07:11:01 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 05/20/2010 02:05 PM, Stefan Hajnoczi wrote: > 8330 kvm:kvm_entry # 0.000 M/sec > ^--- count since starting perf > > The 8330 number means that kvm_entry has fired 8330 times since perf > was started. Like Avi says, you need to keep the perf process > running. I run benchmarks using a script that kills perf after the > benchmark completes. > > Jes, you're right, something like "perf stat -e kvm:* --start" and > "perf stat --stop" would be more usable for system-wide monitoring. I > wonder if it is possible to support this or whether the perf process > needs to periodically accumulate the counters (i.e. babysit the kernel > infrastructure)? > perf needs to be running to pull data out of the kernel (and since profiling is tied to an fd life cycle). What's wrong with starting perf after the warm-up period and stopping it before it's done? -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.