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 04/12] perf symbols: Unexport kernel_map__functions
Date: Fri, 27 Nov 2009 16:29:15 -0200	[thread overview]
Message-ID: <1259346563-12568-4-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1259346563-12568-3-git-send-email-acme@infradead.org>

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

perf annotate was the only user, and it doesn't really needs it.

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/builtin-annotate.c |    8 +++-----
 tools/perf/util/symbol.c      |    3 +--
 tools/perf/util/symbol.h      |    1 -
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 377cb7c..0846c8a 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -169,7 +169,6 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
 		level = '.';
 		map = thread__find_map(thread, ip);
 		if (map != NULL) {
-got_map:
 			ip = map->map_ip(map, ip);
 			sym = map__find_function(map, ip, symbol_filter);
 		} else {
@@ -183,10 +182,9 @@ got_map:
 			 * the "[vdso]" dso, but for now lets use the old
 			 * trick of looking in the whole kernel symbol list.
 			 */
-			if ((long long)ip < 0) {
-				map = kernel_map__functions;
-				goto got_map;
-			}
+			if ((long long)ip < 0)
+				sym = kernel_maps__find_function(ip, &map,
+								 symbol_filter);
 		}
 		dump_printf(" ...... dso: %s\n",
 			    map ? map->dso->long_name : "<not found>");
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index dc25231..0b8a298 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -36,6 +36,7 @@ static int dso__load_kernel_sym(struct dso *self, struct map *map,
 unsigned int symbol__priv_size;
 static int vmlinux_path__nr_entries;
 static char **vmlinux_path;
+static struct map *kernel_map__functions;
 
 static struct symbol_conf symbol_conf__defaults = {
 	.use_modules	  = true,
@@ -1164,8 +1165,6 @@ out:
 	return ret;
 }
 
-struct map *kernel_map__functions;
-
 static void kernel_maps__insert(struct map *map)
 {
 	maps__insert(&kernel_maps__functions, map);
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 5d0371f..fb0be9e 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -105,6 +105,5 @@ size_t kernel_maps__fprintf(FILE *fp);
 int symbol__init(struct symbol_conf *conf);
 
 extern struct list_head dsos__user, dsos__kernel;
-extern struct map *kernel_map__functions;
 extern struct dso *vdso;
 #endif /* __PERF_SYMBOL */
-- 
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     ` Arnaldo Carvalho de Melo [this message]
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                 ` [PATCH 10/12] perf symbols: When not using modules, discard its symbols Arnaldo Carvalho de Melo
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-4-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®