diff options
Diffstat (limited to 'Documentation/perf_counter/util/symbol.h')
-rw-r--r-- | Documentation/perf_counter/util/symbol.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/perf_counter/util/symbol.h b/Documentation/perf_counter/util/symbol.h index 6dffe76a28f0..9e120af9c71f 100644 --- a/Documentation/perf_counter/util/symbol.h +++ b/Documentation/perf_counter/util/symbol.h | |||
@@ -15,12 +15,18 @@ struct symbol { | |||
15 | struct dso { | 15 | struct dso { |
16 | struct list_head node; | 16 | struct list_head node; |
17 | struct rb_root syms; | 17 | struct rb_root syms; |
18 | unsigned int sym_priv_size; | ||
18 | char name[0]; | 19 | char name[0]; |
19 | }; | 20 | }; |
20 | 21 | ||
21 | struct dso *dso__new(const char *name); | 22 | struct dso *dso__new(const char *name, unsigned int sym_priv_size); |
22 | void dso__delete(struct dso *self); | 23 | void dso__delete(struct dso *self); |
23 | 24 | ||
25 | static inline void *dso__sym_priv(struct dso *self, struct symbol *sym) | ||
26 | { | ||
27 | return ((void *)sym) - self->sym_priv_size; | ||
28 | } | ||
29 | |||
24 | struct symbol *dso__find_symbol(struct dso *self, uint64_t ip); | 30 | struct symbol *dso__find_symbol(struct dso *self, uint64_t ip); |
25 | 31 | ||
26 | int dso__load_kallsyms(struct dso *self); | 32 | int dso__load_kallsyms(struct dso *self); |