diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-02-03 13:52:00 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-04 03:33:24 -0500 |
commit | 9de89fe7c577847877ae00ea1aa6315559b10243 (patch) | |
tree | 523bcd2c2b1e2a839100b472ff864860cdc8caeb /tools/perf/util/symbol.h | |
parent | b8f46c5a34fa64fd456295388d18f50ae69d9f37 (diff) |
perf symbols: Remove perf_session usage in symbols layer
I noticed while writing the first test in 'perf regtest' that to
just test the symbol handling routines one needs to create a
perf session, that is a layer centered on a perf.data file,
events, etc, so I untied these layers.
This reduces the complexity for the users as the number of
parameters to most of the symbols and session APIs now was
reduced while not adding more state to all the map instances by
only having data that is needed to split the kernel (kallsyms
and ELF symtab sections) maps and do vmlinux relocation on the
main kernel map.
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: <1265223128-11786-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r-- | tools/perf/util/symbol.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 124302778c09..e6a59e5c2bea 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -80,6 +80,12 @@ static inline void *symbol__priv(struct symbol *self) | |||
80 | return ((void *)self) - symbol_conf.priv_size; | 80 | return ((void *)self) - symbol_conf.priv_size; |
81 | } | 81 | } |
82 | 82 | ||
83 | struct ref_reloc_sym { | ||
84 | const char *name; | ||
85 | u64 addr; | ||
86 | u64 unrelocated_addr; | ||
87 | }; | ||
88 | |||
83 | struct addr_location { | 89 | struct addr_location { |
84 | struct thread *thread; | 90 | struct thread *thread; |
85 | struct map *map; | 91 | struct map *map; |
@@ -126,12 +132,11 @@ static inline struct dso *dsos__findnew(const char *name) | |||
126 | return __dsos__findnew(&dsos__user, name); | 132 | return __dsos__findnew(&dsos__user, name); |
127 | } | 133 | } |
128 | 134 | ||
129 | struct perf_session; | 135 | int dso__load(struct dso *self, struct map *map, symbol_filter_t filter); |
130 | |||
131 | int dso__load(struct dso *self, struct map *map, struct perf_session *session, | ||
132 | symbol_filter_t filter); | ||
133 | int dso__load_vmlinux_path(struct dso *self, struct map *map, | 136 | int dso__load_vmlinux_path(struct dso *self, struct map *map, |
134 | struct perf_session *session, symbol_filter_t filter); | 137 | symbol_filter_t filter); |
138 | int dso__load_kallsyms(struct dso *self, const char *filename, struct map *map, | ||
139 | symbol_filter_t filter); | ||
135 | void dsos__fprintf(FILE *fp); | 140 | void dsos__fprintf(FILE *fp); |
136 | size_t dsos__fprintf_buildid(FILE *fp, bool with_hits); | 141 | size_t dsos__fprintf_buildid(FILE *fp, bool with_hits); |
137 | 142 | ||
@@ -156,9 +161,5 @@ int kallsyms__parse(const char *filename, void *arg, | |||
156 | int symbol__init(void); | 161 | int symbol__init(void); |
157 | bool symbol_type__is_a(char symbol_type, enum map_type map_type); | 162 | bool symbol_type__is_a(char symbol_type, enum map_type map_type); |
158 | 163 | ||
159 | int perf_session__create_kernel_maps(struct perf_session *self); | ||
160 | |||
161 | struct map *perf_session__new_module_map(struct perf_session *self, u64 start, | ||
162 | const char *filename); | ||
163 | extern struct dso *vdso; | 164 | extern struct dso *vdso; |
164 | #endif /* __PERF_SYMBOL */ | 165 | #endif /* __PERF_SYMBOL */ |