From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] perf_counter: optimize mmap/comm tracking
Date: Thu, 09 Apr 2009 11:28:29 +0200 [thread overview]
Message-ID: <1239269309.7647.196.camel@twins> (raw)
In-Reply-To: <20090409091622.GA23636@elte.hu>
On Thu, 2009-04-09 at 11:16 +0200, Ingo Molnar wrote:
> * Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
>
> > +static atomic_t nr_comm_tracking __read_mostly;
>
> hm, nr_comm_tracking is not actually used by any fastpath - just
> increased and then decreased.
Index: linux-2.6/kernel/perf_counter.c
===================================================================
--- linux-2.6.orig/kernel/perf_counter.c
+++ linux-2.6/kernel/perf_counter.c
@@ -2018,7 +2018,12 @@ static void perf_counter_comm_event(stru
void perf_counter_comm(struct task_struct *task)
{
- struct perf_comm_event comm_event = {
+ struct perf_comm_event comm_event;
+
+ if (!atomic_read(&nr_comm_tracking))
+ return;
+
+ comm_event = (struct perf_comm_event){
.task = task,
.event = {
.header = { .type = PERF_EVENT_COMM, },
next prev parent reply other threads:[~2009-04-09 9:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-09 8:53 [PATCH 0/4] perf_counter: fixes and an optimization Peter Zijlstra
2009-04-09 8:53 ` [PATCH 1/4] perf_counter: fix off-by-one on the string lengths Peter Zijlstra
2009-04-09 8:53 ` [PATCH 2/4] perf_counter: optimize mmap/comm tracking Peter Zijlstra
2009-04-09 9:06 ` [tip:perfcounters/core] " Peter Zijlstra
2009-04-09 9:16 ` [PATCH 2/4] " Ingo Molnar
2009-04-09 9:28 ` Peter Zijlstra [this message]
2009-04-09 9:54 ` [tip:perfcounters/core] " Peter Zijlstra
2009-04-09 8:53 ` [PATCH 3/4] perf_counter: sysctl for system wide perf counters Peter Zijlstra
2009-04-09 9:06 ` [tip:perfcounters/core] " Peter Zijlstra
2009-04-09 9:54 ` Peter Zijlstra
2009-04-09 8:53 ` [PATCH 4/4] perf_counter: log full path names Peter Zijlstra
2009-04-09 9:07 ` [tip:perfcounters/core] " Peter Zijlstra
2009-04-09 9:54 ` Peter Zijlstra
2009-04-09 9:03 ` [PATCH 0/4] perf_counter: fixes and an optimization Ingo Molnar
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=1239269309.7647.196.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=cjashfor@linux.vnet.ibm.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 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.