2 #define _PERF_SYMBOL_ 1
4 #include <linux/types.h>
6 #include <linux/list.h>
7 #include <linux/rbtree.h>
12 struct rb_node rb_node;
18 struct module *module;
24 struct list_head node;
26 struct symbol *(*find_symbol)(struct dso *, u64 ip);
27 unsigned int sym_priv_size;
28 unsigned char adjust_symbols;
29 unsigned char slen_calculated;
34 const char *sym_hist_filter;
36 typedef int (*symbol_filter_t)(struct dso *self, struct symbol *sym);
38 struct dso *dso__new(const char *name, unsigned int sym_priv_size);
39 void dso__delete(struct dso *self);
41 static inline void *dso__sym_priv(struct dso *self, struct symbol *sym)
43 return ((void *)sym) - self->sym_priv_size;
46 struct symbol *dso__find_symbol(struct dso *self, u64 ip);
48 int dso__load_kernel(struct dso *self, const char *vmlinux,
49 symbol_filter_t filter, int verbose, int modules);
50 int dso__load_modules(struct dso *self, symbol_filter_t filter, int verbose);
51 int dso__load(struct dso *self, symbol_filter_t filter, int verbose);
52 struct dso *dsos__findnew(const char *name);
53 void dsos__fprintf(FILE *fp);
55 size_t dso__fprintf(struct dso *self, FILE *fp);
56 char dso__symtab_origin(const struct dso *self);
58 int load_kernel(void);
60 void symbol__init(void);
62 extern struct list_head dsos;
63 extern struct dso *kernel_dso;
64 extern struct dso *vdso;
65 extern struct dso *hypervisor_dso;
68 #endif /* _PERF_SYMBOL_ */