2 #define _PERF_SYMBOL_ 1
4 #include <linux/types.h>
6 #include <linux/list.h>
7 #include <linux/rbtree.h>
11 #ifdef HAVE_CPLUS_DEMANGLE
12 extern char *cplus_demangle(const char *, int);
14 static inline char *bfd_demangle(void __used *v, const char *c, int i)
16 return cplus_demangle(c, i);
20 static inline char *bfd_demangle(void __used *v, const char __used *c,
31 #define DMGL_PARAMS (1 << 0) /* Include function args */
32 #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
36 struct rb_node rb_node;
42 struct module *module;
48 struct list_head node;
50 struct symbol *(*find_symbol)(struct dso *, u64 ip);
51 unsigned int sym_priv_size;
52 unsigned char adjust_symbols;
53 unsigned char slen_calculated;
58 extern const char *sym_hist_filter;
60 typedef int (*symbol_filter_t)(struct dso *self, struct symbol *sym);
62 struct dso *dso__new(const char *name, unsigned int sym_priv_size);
63 void dso__delete(struct dso *self);
65 static inline void *dso__sym_priv(struct dso *self, struct symbol *sym)
67 return ((void *)sym) - self->sym_priv_size;
70 struct symbol *dso__find_symbol(struct dso *self, u64 ip);
72 int dso__load_kernel(struct dso *self, const char *vmlinux,
73 symbol_filter_t filter, int verbose, int modules);
74 int dso__load_modules(struct dso *self, symbol_filter_t filter, int verbose);
75 int dso__load(struct dso *self, symbol_filter_t filter, int verbose);
76 struct dso *dsos__findnew(const char *name);
77 void dsos__fprintf(FILE *fp);
79 size_t dso__fprintf(struct dso *self, FILE *fp);
80 char dso__symtab_origin(const struct dso *self);
82 int load_kernel(void);
84 void symbol__init(void);
86 extern struct list_head dsos;
87 extern struct dso *kernel_dso;
88 extern struct dso *vdso;
89 extern struct dso *hypervisor_dso;
90 extern const char *vmlinux_name;
92 #endif /* _PERF_SYMBOL_ */