2 #define _PERF_SYMBOL_ 1
4 #include <linux/types.h>
6 #include <linux/list.h>
7 #include <linux/rbtree.h>
10 #ifdef HAVE_CPLUS_DEMANGLE
11 extern char *cplus_demangle(const char *, int);
13 static inline char *bfd_demangle(void __used *v, const char *c, int i)
15 return cplus_demangle(c, i);
19 static inline char *bfd_demangle(void __used *v, const char __used *c,
30 #define DMGL_PARAMS (1 << 0) /* Include function args */
31 #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
35 struct rb_node rb_node;
41 struct module *module;
47 struct list_head node;
49 struct symbol *(*find_symbol)(struct dso *, u64 ip);
50 unsigned int sym_priv_size;
51 unsigned char adjust_symbols;
52 unsigned char slen_calculated;
57 const char *sym_hist_filter;
59 typedef int (*symbol_filter_t)(struct dso *self, struct symbol *sym);
61 struct dso *dso__new(const char *name, unsigned int sym_priv_size);
62 void dso__delete(struct dso *self);
64 static inline void *dso__sym_priv(struct dso *self, struct symbol *sym)
66 return ((void *)sym) - self->sym_priv_size;
69 struct symbol *dso__find_symbol(struct dso *self, u64 ip);
71 int dso__load_kernel(struct dso *self, const char *vmlinux,
72 symbol_filter_t filter, int verbose, int modules);
73 int dso__load_modules(struct dso *self, symbol_filter_t filter, int verbose);
74 int dso__load(struct dso *self, symbol_filter_t filter, int verbose);
76 size_t dso__fprintf(struct dso *self, FILE *fp);
77 char dso__symtab_origin(const struct dso *self);
79 void symbol__init(void);
80 #endif /* _PERF_SYMBOL_ */