diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-11-20 17:51:27 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-21 08:11:33 -0500 |
commit | c338aee853db197e1855b393e6d6cc667784537f (patch) | |
tree | f97fea21c608a689144302b8dd78ef29bfaa5c88 /tools/perf/util/event.h | |
parent | 78075caad99dc36ec6ef5826b7a5273ea14295fc (diff) |
perf symbols: Do lazy symtab loading for the kernel & modules too
Just like we do with the other DSOs. This also simplifies the
kernel_maps setup process, now all that the tools need to do is
to call kernel_maps__init and the maps for the modules and
kernel will be created, then, later, when
kernel_maps__find_symbol() is used, it will also call
maps__find_symbol that already checks if the symtab was loaded,
loading it if needed.
Now if one does 'perf top --hide_kernel_symbols' we won't pay
the price of loading the (many) symbols in /proc/kallsyms or
vmlinux.
Signed-off-by: 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>
LKML-Reference: <1258757489-5978-4-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/event.h')
-rw-r--r-- | tools/perf/util/event.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 34c6fcb82d92..f1e392612652 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h | |||
@@ -115,10 +115,13 @@ typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym); | |||
115 | void map__init(struct map *self, u64 start, u64 end, u64 pgoff, | 115 | void map__init(struct map *self, u64 start, u64 end, u64 pgoff, |
116 | struct dso *dso); | 116 | struct dso *dso); |
117 | struct map *map__new(struct mmap_event *event, char *cwd, int cwdlen); | 117 | struct map *map__new(struct mmap_event *event, char *cwd, int cwdlen); |
118 | void map__delete(struct map *self); | ||
118 | struct map *map__clone(struct map *self); | 119 | struct map *map__clone(struct map *self); |
119 | int map__overlap(struct map *l, struct map *r); | 120 | int map__overlap(struct map *l, struct map *r); |
120 | size_t map__fprintf(struct map *self, FILE *fp); | 121 | size_t map__fprintf(struct map *self, FILE *fp); |
121 | struct symbol *map__find_symbol(struct map *self, u64 ip, symbol_filter_t filter); | 122 | struct symbol *map__find_symbol(struct map *self, u64 ip, symbol_filter_t filter); |
123 | void map__fixup_start(struct map *self); | ||
124 | void map__fixup_end(struct map *self); | ||
122 | 125 | ||
123 | int event__synthesize_thread(pid_t pid, int (*process)(event_t *event)); | 126 | int event__synthesize_thread(pid_t pid, int (*process)(event_t *event)); |
124 | void event__synthesize_threads(int (*process)(event_t *event)); | 127 | void event__synthesize_threads(int (*process)(event_t *event)); |