From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jes Sorensen Subject: Re: Wiki docs on counting and tracing KVM perf events Date: Thu, 20 May 2010 13:16:14 +0200 Message-ID: <4BF519FE.6040208@redhat.com> References: <4BEC1345.7040408@redhat.com> <4BF4EF97.5060705@redhat.com> <4BF4F07F.4020007@redhat.com> <4BF4F1D1.6030203@redhat.com> <4BF518C1.60304@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Stefan Hajnoczi , kvm To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:10166 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752152Ab0ETLQT (ORCPT ); Thu, 20 May 2010 07:16:19 -0400 In-Reply-To: <4BF518C1.60304@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/20/10 13:10, Avi Kivity wrote: > On 05/20/2010 02:05 PM, Stefan Hajnoczi wrote: >> 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? It's pretty hard to script. I have scripts that do 'read_stats() ; run_test() ; read_stats() ; calc_average()' Autotest would like to do this kinda stuff too. Jes