public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Anton Blanchard <anton@samba.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, anton@samba.org, hpa@zytor.com,
	mingo@redhat.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perfcounters/urgent] perf top: Move skip symbols to an array
Date: Tue, 30 Jun 2009 23:28:11 GMT	[thread overview]
Message-ID: <tip-2ab52083ffc057014e502cf3473adc41436922fa@git.kernel.org> (raw)
In-Reply-To: <20090630230140.904782938@samba.org>

Commit-ID:  2ab52083ffc057014e502cf3473adc41436922fa
Gitweb:     http://git.kernel.org/tip/2ab52083ffc057014e502cf3473adc41436922fa
Author:     Anton Blanchard <anton@samba.org>
AuthorDate: Wed, 1 Jul 2009 09:00:46 +1000
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 1 Jul 2009 01:25:19 +0200

perf top: Move skip symbols to an array

Move the list of symbols we skip into an array, making it
easier to add new ones.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <20090630230140.904782938@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 tools/perf/builtin-top.c |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 5c29655..731ec6d 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -286,11 +286,22 @@ static void *display_thread(void *arg)
 	return NULL;
 }
 
+/* Tag samples to be skipped. */
+char *skip_symbols[] = {
+	"default_idle",
+	"cpu_idle",
+	"enter_idle",
+	"exit_idle",
+	"mwait_idle",
+	NULL
+};
+
 static int symbol_filter(struct dso *self, struct symbol *sym)
 {
 	static int filter_match;
 	struct sym_entry *syme;
 	const char *name = sym->name;
+	int i;
 
 	if (!strcmp(name, "_text") ||
 	    !strcmp(name, "_etext") ||
@@ -302,13 +313,12 @@ static int symbol_filter(struct dso *self, struct symbol *sym)
 		return 1;
 
 	syme = dso__sym_priv(self, sym);
-	/* Tag samples to be skipped. */
-	if (!strcmp("default_idle", name) ||
-	    !strcmp("cpu_idle", name) ||
-	    !strcmp("enter_idle", name) ||
-	    !strcmp("exit_idle", name) ||
-	    !strcmp("mwait_idle", name))
-		syme->skip = 1;
+	for (i = 0; skip_symbols[i]; i++) {
+		if (!strcmp(skip_symbols[i], name)) {
+			syme->skip = 1;
+			break;
+		}
+	}
 
 	if (filter_match == 1) {
 		filter_end = sym->start;

  reply	other threads:[~2009-06-30 23:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30 23:00 [patch 0/8] Various PCL fixes Anton Blanchard
2009-06-30 23:00 ` [patch 1/8] perf report: Fix -z option Anton Blanchard
2009-06-30 23:27   ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-06-30 23:00 ` [patch 2/8] perf_counter tools: Remove zlib dependency Anton Blanchard
2009-06-30 23:27   ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-06-30 23:00 ` [patch 3/8] perf top: Move skip symbols to an array Anton Blanchard
2009-06-30 23:28   ` tip-bot for Anton Blanchard [this message]
2009-07-01  4:31   ` Stephen Rothwell
2009-07-01 10:50     ` Ingo Molnar
2009-06-30 23:00 ` [patch 4/8] perf top: Add ppc64 specific skip symbols and strip ppc64 . prefix Anton Blanchard
2009-06-30 23:21   ` Ingo Molnar
2009-06-30 23:26     ` Anton Blanchard
2009-06-30 23:28   ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-06-30 23:00 ` [patch 5/8] perf report: Fix reporting of hypervisor Anton Blanchard
2009-06-30 23:28   ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-06-30 23:00 ` [patch 6/8] perf report: Add hypervisor dso Anton Blanchard
2009-06-30 23:28   ` [tip:perfcounters/urgent] " tip-bot for Anton Blanchard
2009-06-30 23:00 ` [patch 7/8] powerpc: Cleanup PCL output by hiding and adding symbols Anton Blanchard
2009-06-30 23:22   ` Ingo Molnar
2009-06-30 23:00 ` [patch 8/8] powerpc: Fix PCL vdso detection Anton Blanchard
2009-06-30 23:23   ` 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=tip-2ab52083ffc057014e502cf3473adc41436922fa@git.kernel.org \
    --to=anton@samba.org \
    --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