From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Paul Mackerras <paulus@samba.org>,
Stephane Eranian <eranian@google.com>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Thomas Gleixner <tglx@linutronix.de>,
Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Subject: Re: [RFC PATCH 0/4] perf: Custom contexts
Date: Wed, 16 Mar 2011 15:31:52 +0100 [thread overview]
Message-ID: <1300285912.2203.1580.camel@twins> (raw)
In-Reply-To: <20110316140242.GB1774@nowhere>
On Wed, 2011-03-16 at 15:02 +0100, Frederic Weisbecker wrote:
> The possible usecase is so wide that I have a hard time to find a good
> example. Counting instructions in exceptions on some specific syscalls,
> counting instructions when some lock is taken on some irq handler, or
> whatever...
All of which can be done without the recursion, but ok.
But what you're saying is that you want to be able to build a full
expression tree of events.
Now the things I dislike about the whole thing is that its essentially a
filter, and we already have a filter thing, this adds a second totally
dis-joint filter capability.
Futhermore, you've split the start/stop things, as if they're somehow
different, when in fact they're pretty much the same thing, and you can
even think of more classes like a toggle event or whatever.
You've also split the start/stop events from the regular event lists
making the whole event management and inheritance stuff even more
complicated.
Furthermore, there is a definite possibility for weird behaviour in
there, in that if you're trying to measure a similar event to the one
that is used to enable/disable it, it very much depends on the order of
the demux lists as to which is processed first.
The simply scheme I came up with is having these events be part of the
event_group and add only one field:
pause_ops : 2
with:
enum perf_event_pause_ops {
PERF_PAUSE_OP_NOP = 0,
PERF_PAUSE_OP_INC,
PERF_PAUSE_OP_DEC,
PERF_PAUSE_OP_TOGGLE,
};
and have INC increment the parent pause field and clip at INT_MAX, DEC
decrement the pause field and clip at 0, and TOGGLE do ^1.
That however doesn't allow for these full expression trees, so we need
to come up with something else. It does however do away with the
ioctl()s, that redundant flag and the weird event separation.
It is still susceptible to the demux order.
next prev parent reply other threads:[~2011-03-16 14:32 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-14 19:17 [RFC PATCH 0/4] perf: Custom contexts Frederic Weisbecker
2011-03-14 19:18 ` [RFC PATCH 1/4] perf: Starter and stopper events Frederic Weisbecker
2011-03-15 14:36 ` Lin Ming
2011-03-15 17:54 ` Frederic Weisbecker
2011-03-16 14:21 ` Frederic Weisbecker
2011-03-14 19:18 ` [RFC PATCH 3/4] perf: Support for starter and stopper in tools Frederic Weisbecker
2011-03-14 19:18 ` [RFC PATCH 4/4] perf: New --enable-on-starter option Frederic Weisbecker
2011-03-14 20:43 ` [RFC PATCH 0/4] perf: Custom contexts Arnaldo Carvalho de Melo
2011-03-14 20:51 ` Frederic Weisbecker
2011-03-14 21:03 ` Arnaldo Carvalho de Melo
2011-03-14 21:20 ` Frederic Weisbecker
2011-03-14 21:56 ` Arnaldo Carvalho de Melo
2011-03-14 22:19 ` Arnaldo Carvalho de Melo
2011-03-14 22:43 ` Frederic Weisbecker
2011-03-14 23:02 ` Arnaldo Carvalho de Melo
2011-03-15 18:58 ` Frederic Weisbecker
2011-03-15 19:24 ` Arnaldo Carvalho de Melo
2011-03-16 1:03 ` Frederic Weisbecker
2011-03-16 15:47 ` Masami Hiramatsu
2011-03-16 17:53 ` Arnaldo Carvalho de Melo
2011-03-16 18:02 ` Peter Zijlstra
2011-03-15 22:32 ` Peter Zijlstra
2011-03-16 13:53 ` Frederic Weisbecker
2011-03-16 13:56 ` Peter Zijlstra
2011-03-16 14:02 ` Frederic Weisbecker
2011-03-16 14:31 ` Peter Zijlstra [this message]
2011-03-25 14:47 ` Frederic Weisbecker
2011-03-25 15:03 ` Peter Zijlstra
2011-04-13 14:27 ` Frederic Weisbecker
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=1300285912.2203.1580.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mitake@dcl.info.waseda.ac.jp \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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