From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753476Ab0IFMaE (ORCPT ); Mon, 6 Sep 2010 08:30:04 -0400 Received: from casper.infradead.org ([85.118.1.10]:49149 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752155Ab0IFMaC convert rfc822-to-8bit (ORCPT ); Mon, 6 Sep 2010 08:30:02 -0400 Subject: Re: disabling group leader perf_event From: Peter Zijlstra To: Avi Kivity Cc: linux-perf-users@vger.kernel.org, linux-kernel , Ingo Molnar In-Reply-To: <4C84D77B.6040600@redhat.com> References: <4C84B088.5050003@redhat.com> <1283772256.1930.303.camel@laptop> <4C84D1CE.3070205@redhat.com> <1283774045.1930.341.camel@laptop> <4C84D77B.6040600@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Mon, 06 Sep 2010 14:29:49 +0200 Message-ID: <1283776189.1930.380.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2010-09-06 at 14:58 +0300, Avi Kivity wrote: > On 09/06/2010 02:54 PM, Peter Zijlstra wrote: > > > >> Basically, to read() all events in one go. I have many of them. > >> > >> My current problem is that I have an event (kvm_exit) which I want to > >> drill down by looking at a field (exit_reason). So I create lots of > >> separate perf_events with a filter for each reason: > >> kvm_exit(exit_reason==0), kvm_exit(exit_reason==1), etc. But filters > >> are fairly slow (can have ~60 such events on AMD), so I want to make > >> this drill-down optional. > > Yeah, filters suck. > > Any idea why? I saw nothing obvious in the code, except that there is > lots of it. It filters after it does all the hard work of creating the trace event, instead of before. > > So what you're basically trying to do is create some histogram of > > exit_reason? > > Yes, exactly. One thing I thought of, you can use the unfiltered kvm_exit event as leader, that will give you the total number of events, which, esp. when you create partial histograms, is useful to figure out how much you missed. You can individually disable/enable !leader siblings. > (one other issue - right now I'm using cpu events. If I switch to task > events, I lose events generated by workqueues, yes?) Right, those have their own tasks.