From: Peter Zijlstra <peterz@infradead.org>
To: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, fweisbec@gmail.com,
Dave Wootton <dwootton@us.ibm.com>
Subject: Re: Why is PERF_FORMAT_GROUP incompatible with inherited events?
Date: Mon, 15 Feb 2010 10:29:06 +0100 [thread overview]
Message-ID: <1266226146.5273.743.camel@laptop> (raw)
In-Reply-To: <20100215045644.GK13769@brick.ozlabs.ibm.com>
On Mon, 2010-02-15 at 15:56 +1100, Paul Mackerras wrote:
> On Sun, Feb 14, 2010 at 01:38:27PM +0100, Peter Zijlstra wrote:
> > On Sun, 2010-02-14 at 22:33 +1100, Paul Mackerras wrote:
> > >
> > > But we don't go and collect the count delta from children without
> > > PERF_FORMAT_GROUP, so why would we with it?
> >
> > Yes we do, see perf_event_read_value().
>
> Ah, true, I should have read the code more carefully.
>
> > But now that I look at it we don't seem to do so in
> > perf_output_read_one()... I guess we should fix that.
>
> I suppose it should give the same value as read() would, but the
> possibly unbounded interrupt latency is a bit of a worry. I can't
> think of a way to avoid it, though (other than not using
> PERF_SAMPLE_READ with inherited sampling events :).
>
> > There is of course the lock inversion in the .read() code reported by
> > stephane, but other than that is seems to actually support inherited &&
> > group just fine.
> >
> > So I think if we fix that lock inversion and make the PERF_SAMPLE_READ
> > code look like the .read() code it should all work out.
I now realize that this is going to be very complicated because it
involves sending IPIs from NMI context, which is rather involved.
So I might have meant:
attr->inherit && (attr->sample_format & PERF_SAMPLE_READ)
to be mutually exclusive.
prev parent reply other threads:[~2010-02-15 9:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-12 3:02 Why is PERF_FORMAT_GROUP incompatible with inherited events? Paul Mackerras
2010-02-14 10:12 ` Peter Zijlstra
2010-02-14 11:33 ` Paul Mackerras
2010-02-14 12:38 ` Peter Zijlstra
2010-02-15 4:56 ` Paul Mackerras
2010-02-15 9:29 ` Peter Zijlstra [this message]
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=1266226146.5273.743.camel@laptop \
--to=peterz@infradead.org \
--cc=dwootton@us.ibm.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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