From: Soeren Sandmann <sandmann@daimi.au.dk>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Fr??d??ric Weisbecker <fweisbec@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH 2/2 -tip] perf: Don't generate events for the idle task when exclude_idle is set.
Date: 22 Oct 2009 18:34:08 +0200 [thread overview]
Message-ID: <ye8pr8fmlq7.fsf@camel16.daimi.au.dk> (raw)
In-Reply-To: <ye8vdi7mluz.fsf@camel16.daimi.au.dk>
Getting samples for the idle task is often not interesting, so don't
generate them when exclude_idle is set for the event in question.
Signed-off-by: Søren Sandmann Pedersen <sandmann@redhat.com>
---
kernel/perf_event.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index b492c55..7bc84cb 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -3959,8 +3959,9 @@ static enum hrtimer_restart perf_swevent_hrtimer(struct hrtimer *hrtimer)
regs = task_pt_regs(current);
if (regs) {
- if (perf_event_overflow(event, 0, &data, regs))
- ret = HRTIMER_NORESTART;
+ if (!(event->attr.exclude_idle && current->pid == 0))
+ if (perf_event_overflow(event, 0, &data, regs))
+ ret = HRTIMER_NORESTART;
}
period = max_t(u64, 10000, event->hw.sample_period);
--
1.6.5.rc2
next parent reply other threads:[~2009-10-22 16:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ye8vdi7mluz.fsf@camel16.daimi.au.dk>
2009-10-22 16:34 ` Soeren Sandmann [this message]
2009-10-22 16:38 ` [PATCH] x86: Get bp from the IRQ regs instead of directly from the CPU Soeren Sandmann
2009-10-23 10:50 ` Ingo Molnar
2009-10-29 12:46 ` Soeren Sandmann
2010-11-05 11:14 ` [PATCH 0/1] x86: Eliminate bp argument from the stack tracing routines Søren Sandmann Pedersen
2010-11-07 21:24 ` Frederic Weisbecker
2010-11-08 11:38 ` Soeren Sandmann
2010-11-18 15:32 ` Frederic Weisbecker
2010-11-05 11:14 ` [PATCH] " Søren Sandmann Pedersen
2009-10-23 7:35 ` [PATCH 1/2 -tip] perf: Keep track of remaining time when enabling/disabling swevent hrtimers 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=ye8pr8fmlq7.fsf@camel16.daimi.au.dk \
--to=sandmann@daimi.au.dk \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox