All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Frederic Weisbecker <fweisbec@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, eranian@google.com,
	paulus@samba.org, acme@redhat.com, hpa@zytor.com,
	mingo@redhat.com, a.p.zijlstra@chello.nl, fweisbec@gmail.com,
	stable@kernel.org, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/urgent] perf: Handle stopped state with tracepoints
Date: Wed, 16 Mar 2011 13:58:52 GMT	[thread overview]
Message-ID: <tip-a0f7d0f7fc02465bb9758501f611f63381792996@git.kernel.org> (raw)
In-Reply-To: <1299529629-18280-2-git-send-email-fweisbec@gmail.com>

Commit-ID:  a0f7d0f7fc02465bb9758501f611f63381792996
Gitweb:     http://git.kernel.org/tip/a0f7d0f7fc02465bb9758501f611f63381792996
Author:     Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Mon, 7 Mar 2011 21:27:09 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 16 Mar 2011 14:04:14 +0100

perf: Handle stopped state with tracepoints

We toggle the state from start and stop callbacks but actually
don't check it when the event triggers. Do it so that
these callbacks actually work.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: <stable@kernel.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1299529629-18280-2-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/perf_event.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 974e2e6..533f715 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -5478,6 +5478,8 @@ static int perf_tp_event_match(struct perf_event *event,
 				struct perf_sample_data *data,
 				struct pt_regs *regs)
 {
+	if (event->hw.state & PERF_HES_STOPPED)
+		return 0;
 	/*
 	 * All tracepoints are from kernel-space.
 	 */

  reply	other threads:[~2011-03-16 13:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07 20:27 [PATCH 1/2] perf: Fix the software events state check Frederic Weisbecker
2011-03-07 20:27 ` [PATCH 2/2] perf: Handle stopped state with tracepoints Frederic Weisbecker
2011-03-16 13:58   ` tip-bot for Frederic Weisbecker [this message]
2011-03-09  9:28 ` [PATCH 1/2] perf: Fix the software events state check Ingo Molnar
2011-03-09 13:52   ` Frederic Weisbecker
2011-03-09 13:55     ` Peter Zijlstra
2011-03-16 13:58 ` [tip:perf/urgent] " tip-bot for 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=tip-a0f7d0f7fc02465bb9758501f611f63381792996@git.kernel.org \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=eranian@google.com \
    --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=paulus@samba.org \
    --cc=stable@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.