linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-perf-users@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: disabling group leader perf_event
Date: Mon, 06 Sep 2010 14:58:51 +0300	[thread overview]
Message-ID: <4C84D77B.6040600@redhat.com> (raw)
In-Reply-To: <1283774045.1930.341.camel@laptop>

  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.

> So what you're basically trying to do is create some histogram of
> exit_reason?

Yes, exactly.

> Being able to make histograms in-kernel has been on the todo list for a
> long while, its just that I never could come up with a sane
> interface.. :/

Interesting, I thought it was just me.

One option is to keep the existing filter interface, but recognize those 
cases and optimize the implementation.  Sort of like a compiler can 
optimize a large dense switch statement to a jump table.

>> Current plan is to have a group for the basic events and another group
>> for the drilldown events (each per-cpu), and activate the drilldown
>> group on user request.  perf will be able to schedule both groups
>> concurrently since they only contain tracepoints, yes?
> More or less, yeah (the scheduling of software and hardware events isn't
> properly separated atm -- am working on that). Software events have no
> scheduling constraints and should always get scheduled.

Great, thanks.

(one other issue - right now I'm using cpu events.  If I switch to task 
events, I lose events generated by workqueues, yes?)

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2010-09-06 11:59 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-06  9:12 disabling group leader perf_event Avi Kivity
2010-09-06 11:24 ` Peter Zijlstra
2010-09-06 11:34   ` Avi Kivity
2010-09-06 11:54     ` Peter Zijlstra
2010-09-06 11:58       ` Avi Kivity [this message]
2010-09-06 12:29         ` Peter Zijlstra
2010-09-06 12:40           ` Ingo Molnar
2010-09-06 13:16             ` Steven Rostedt
2010-09-06 16:42               ` Tom Zanussi
2010-09-07 12:53                 ` Steven Rostedt
2010-09-07 14:16                   ` Tom Zanussi
2010-09-06 12:49           ` Avi Kivity
2010-09-06 12:43         ` Ingo Molnar
2010-09-06 12:45           ` Avi Kivity
2010-09-06 12:59             ` Ingo Molnar
2010-09-06 13:41               ` Pekka Enberg
2010-09-06 13:54                 ` Ingo Molnar
2010-09-06 14:57               ` Avi Kivity
2010-09-06 15:30                 ` Alan Cox
2010-09-06 15:20                   ` Avi Kivity
2010-09-06 15:48                     ` Alan Cox
2010-09-06 17:50                       ` Avi Kivity
2010-09-06 15:47                 ` Ingo Molnar
2010-09-06 17:55                   ` Avi Kivity
2010-09-07  3:44                     ` Ingo Molnar
2010-09-07  8:33                       ` Stefan Hajnoczi
2010-09-07  9:13                         ` Avi Kivity
2010-09-07 22:43                         ` Ingo Molnar
2010-09-07 15:55                       ` Alan Cox
2010-09-08  1:44                       ` Paul Mackerras
2010-09-08  6:16                         ` Pekka Enberg
2010-09-08  6:44                           ` Ingo Molnar
2010-09-08  7:30                             ` Peter Zijlstra
2010-09-08 19:30                             ` Frank Ch. Eigler
2010-09-09  7:38                               ` Ingo Molnar
2010-09-08  6:19                         ` Avi Kivity
2010-09-06 20:31                   ` Pekka Enberg
2010-09-06 20:37                     ` Pekka Enberg
2010-09-07  4:03                     ` Ingo Molnar
2010-09-07  9:30                       ` Pekka Enberg
2010-09-07 22:27                         ` Ingo Molnar
2010-09-07 10:57                     ` KOSAKI Motohiro
2010-09-07 12:14                       ` Pekka Enberg
2010-09-07 13:35                   ` Steven Rostedt
2010-09-07 13:47                     ` Avi Kivity
2010-09-07 16:02                       ` Steven Rostedt
2010-09-12  6:46                   ` Pavel Machek
2010-09-12 17:54                     ` Avi Kivity
2010-09-12 18:48                       ` Ingo Molnar
2010-09-12 19:14                         ` Pavel Machek
2010-09-12 20:32                           ` Ingo Molnar
2010-09-12 21:06                             ` Pavel Machek
2010-09-12 22:19                               ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C84D77B.6040600@redhat.com \
    --to=avi@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).