From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: How about limiting refresh ioctl to sampling events ?
Date: Tue, 23 Nov 2010 14:07:26 +0100 [thread overview]
Message-ID: <1290517646.2072.403.camel@laptop> (raw)
In-Reply-To: <m3zkt05h3w.fsf@gmail.com>
On Tue, 2010-11-23 at 14:01 +0100, Franck Bui-Huu wrote:
> Hello Peter,
>
> I'm looking at the perf event stuff and wondering if
> perf_event_refresh() should be limited to sampling events.
>
> Does the following make sense ?
>
> diff --git a/kernel/perf_event.c b/kernel/perf_event.c
> index 3b105e0..1a90a6c 100644
> --- a/kernel/perf_event.c
> +++ b/kernel/perf_event.c
> @@ -1072,7 +1072,7 @@ static int perf_event_refresh(struct perf_event *event, int refresh)
> /*
> * not supported on inherited events
> */
> - if (event->attr.inherit)
> + if (event->attr.inherit || !event->attr.sample_period)
> return -EINVAL;
>
> atomic_add(refresh, &event->event_limit);
Yes it does, please submit as a proper patch.
next prev parent reply other threads:[~2010-11-23 13:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 13:01 How about limiting refresh ioctl to sampling events ? Franck Bui-Huu
2010-11-23 13:07 ` Peter Zijlstra [this message]
2010-11-23 13:19 ` Franck Bui-Huu
2010-11-23 13:46 ` Peter Zijlstra
2010-11-24 10:19 ` Francis Moreau
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=1290517646.2072.403.camel@laptop \
--to=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=vagabon.xyz@gmail.com \
/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