mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
	"Arnaldo Carvalho de Melo" <acme@redhat.com>,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	"Mike Galbraith" <efault@gmx.de>,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	"Paul Mackerras" <paulus@samba.org>
Subject: [PATCH 10/12] perf symbols: When not using modules, discard its symbols
Date: Fri, 27 Nov 2009 16:29:21 -0200	[thread overview]
Message-ID: <1259346563-12568-10-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1259346563-12568-9-git-send-email-acme@infradead.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/symbol.c |    6 +++++-
 tools/perf/util/thread.h |    1 +
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index b6a2941..b788c2f 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -381,6 +381,9 @@ static int dso__split_kallsyms(struct dso *self, struct map *map, struct thread
 
 		module = strchr(pos->name, '\t');
 		if (module) {
+			if (!thread->use_modules)
+				goto discard_symbol;
+
 			*module++ = '\0';
 
 			if (strcmp(self->name, module)) {
@@ -420,7 +423,7 @@ static int dso__split_kallsyms(struct dso *self, struct map *map, struct thread
 		}
 
 		if (filter && filter(curr_map, pos)) {
-			rb_erase(&pos->rb_node, root);
+discard_symbol:		rb_erase(&pos->rb_node, root);
 			symbol__delete(pos);
 		} else {
 			if (curr_map != map) {
@@ -1635,6 +1638,7 @@ int symbol__init(struct symbol_conf *conf)
 		return -1;
 	}
 
+	kthread->use_modules = pconf->use_modules;
 	if (pconf->use_modules && thread__create_module_maps(kthread) < 0)
 		pr_debug("Failed to load list of modules in use, "
 			 "continuing...\n");
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index 3bdd9b2..59b0d9b 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -10,6 +10,7 @@ struct thread {
 	struct rb_root		maps[MAP__NR_TYPES];
 	struct list_head	removed_maps[MAP__NR_TYPES];
 	pid_t			pid;
+	bool			use_modules;
 	char			shortname[3];
 	char			*comm;
 	int			comm_len;
-- 
1.6.2.5


  reply	other threads:[~2009-11-27 18:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27 18:29 [PATCH 01/12] perf symbols: Avoid annoying message about loading [vdso] symbols Arnaldo Carvalho de Melo
2009-11-27 18:29 ` [PATCH 02/12] perf symbols: Rename kernel_map[s] to kernel_map[s]__functions Arnaldo Carvalho de Melo
2009-11-27 18:29   ` [PATCH 03/12] perf symbols: Split the dsos list into kernel and user parts Arnaldo Carvalho de Melo
2009-11-27 18:29     ` [PATCH 04/12] perf symbols: Unexport kernel_map__functions Arnaldo Carvalho de Melo
2009-11-27 18:29       ` [PATCH 05/12] perf symbols: Add a 'type' field to struct map Arnaldo Carvalho de Melo
2009-11-27 18:29         ` [PATCH 06/12] perf symbols: Better support for multiple symbol tables per dso Arnaldo Carvalho de Melo
2009-11-27 18:29           ` [PATCH 07/12] perf symbols: Make the kallsyms loading routines part of the dso class Arnaldo Carvalho de Melo
2009-11-27 18:29             ` [PATCH 08/12] perf symbols: kernel_maps should be an array of MAP__NR_TYPES entries Arnaldo Carvalho de Melo
2009-11-27 18:29               ` [PATCH 09/12] perf symbols: Support multiple symtabs in struct thread Arnaldo Carvalho de Melo
2009-11-27 18:29                 ` Arnaldo Carvalho de Melo [this message]
2009-11-27 18:29                   ` [PATCH 11/12] perf tools: Reorganize event processing routines, lotsa dups killed Arnaldo Carvalho de Melo
2009-11-27 18:29                     ` [PATCH 12/12] perf tools: Consolidate symbol resolving across all tools Arnaldo Carvalho de Melo

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=1259346563-12568-10-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=efault@gmx.de \
    --cc=fweisbec@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®