public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Paul Mackerras <paulus@samba.org>,
	Arjan van de Ven <arjan@infradead.org>,
	Li Zefan <lizf@cn.fujitsu.com>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH] perf: Fix bad software/trace event recursion counting
Date: Tue, 24 Nov 2009 20:38:22 +0100	[thread overview]
Message-ID: <1259091502-5171-1-git-send-email-fweisbec@gmail.com> (raw)
In-Reply-To: <20091124100724.GA5570@elte.hu>

Commit 4ed7c92d68a5387ba5f7030dc76eab03558e27f5
(perf_events: Undo some recursion damage) has introduced a bad
reference counting of the recursion context. putting the context
behaves like getting it, dropping every software/trace events
after the first one in a context.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
---
 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 accfd7b..35df94e 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -3914,7 +3914,7 @@ void perf_swevent_put_recursion_context(int rctx)
 {
 	struct perf_cpu_context *cpuctx = &__get_cpu_var(perf_cpu_context);
 	barrier();
-	cpuctx->recursion[rctx]++;
+	cpuctx->recursion[rctx]--;
 	put_cpu_var(perf_cpu_context);
 }
 EXPORT_SYMBOL_GPL(perf_swevent_put_recursion_context);
-- 
1.6.2.3


  parent reply	other threads:[~2009-11-24 19:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-24  5:25 [PATCH 0/5] perf kmem: Add more functions and show more statistics Li Zefan
2009-11-24  5:25 ` [PATCH 1/5] perf kmem: Add new option to show raw ip Li Zefan
2009-11-24 16:54   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-24  5:26 ` [PATCH 2/5] perf kmem: Default to sort by fragmentation Li Zefan
2009-11-24 16:55   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-24  5:26 ` [PATCH 3/5] perf kmem: Collect cross node allocation statistics Li Zefan
2009-11-24 16:55   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-24  5:26 ` [PATCH 4/5] perf kmem: Measure kmalloc/kfree CPU ping-pong call-sites Li Zefan
2009-11-24 16:55   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-24  5:27 ` [PATCH 5/5] perf kmem: Add help file Li Zefan
2009-11-24 16:55   ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-24  7:15 ` [PATCH 0/5] perf kmem: Add more functions and show more statistics Pekka Enberg
2009-11-24  7:34   ` Ingo Molnar
2009-11-24  7:45     ` Pekka Enberg
2009-11-24  7:47       ` Ingo Molnar
2009-11-24  8:04     ` Li Zefan
2009-11-24  8:34       ` Ingo Molnar
2009-11-24 14:57         ` Arjan van de Ven
2009-11-24  7:18 ` Pekka Enberg
2009-11-24  9:04 ` Ingo Molnar
2009-11-24  9:38   ` Li Zefan
2009-11-24 10:07     ` Ingo Molnar
2009-11-24 11:04       ` Li Zefan
2009-11-24 20:35         ` Ingo Molnar
2009-11-24 22:34           ` Ingo Molnar
2009-11-24 18:49       ` Frederic Weisbecker
2009-11-24 19:38       ` Frederic Weisbecker [this message]
2009-11-24 20:36         ` [tip:perf/core] perf_events: Fix bad software/trace event recursion counting tip-bot for Frederic Weisbecker
2009-11-24 20:48         ` [PATCH] perf: " Peter Zijlstra

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=1259091502-5171-1-git-send-email-fweisbec@gmail.com \
    --to=fweisbec@gmail.com \
    --cc=acme@redhat.com \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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