public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Franck Bui-Huu <fbuihuu@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	a.p.zijlstra@chello.nl, fbuihuu@gmail.com, tglx@linutronix.de,
	mingo@elte.hu
Subject: [tip:perf/core] perf: Limit event refresh to sampling event
Date: Fri, 26 Nov 2010 15:04:12 GMT	[thread overview]
Message-ID: <tip-2e939d1da9b5628642314c1e68b4319e61263c94@git.kernel.org> (raw)
In-Reply-To: <1290525705-6265-2-git-send-email-fbuihuu@gmail.com>

Commit-ID:  2e939d1da9b5628642314c1e68b4319e61263c94
Gitweb:     http://git.kernel.org/tip/2e939d1da9b5628642314c1e68b4319e61263c94
Author:     Franck Bui-Huu <fbuihuu@gmail.com>
AuthorDate: Tue, 23 Nov 2010 16:21:44 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 26 Nov 2010 15:14:55 +0100

perf: Limit event refresh to sampling event

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1290525705-6265-2-git-send-email-fbuihuu@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/perf_event.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 8806984..027c4d3 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1073,7 +1073,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 || !is_sampling_event(event))
 		return -EINVAL;
 
 	atomic_add(refresh, &event->event_limit);

  parent reply	other threads:[~2010-11-26 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 15:21 [PATCH 1/3] perf: introduce is_sampling_event() Franck Bui-Huu
2010-11-23 15:21 ` [PATCH 2/3] perf: Limit event refresh to sampling event Franck Bui-Huu
2010-11-23 15:21   ` [PATCH 3/3] perf: don't bother to init the hrtimer for no SW sampling counters Franck Bui-Huu
2010-11-26 15:04     ` [tip:perf/core] perf: Don't " tip-bot for Franck Bui-Huu
2010-11-26 15:04   ` tip-bot for Franck Bui-Huu [this message]
2010-11-26 15:03 ` [tip:perf/core] perf: Introduce is_sampling_event() tip-bot for Franck Bui-Huu

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=tip-2e939d1da9b5628642314c1e68b4319e61263c94@git.kernel.org \
    --to=fbuihuu@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --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