2 #define __PERF_SYMBOL 1
4 #include <linux/types.h>
7 #include <linux/list.h>
8 #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;
43 struct list_head node;
45 struct symbol *(*find_symbol)(struct dso *, u64 ip);
46 unsigned int sym_priv_size;
47 unsigned char adjust_symbols;
48 unsigned char slen_calculated;
50 const char *short_name;
55 struct dso *dso__new(const char *name, unsigned int sym_priv_size);
56 void dso__delete(struct dso *self);
58 static inline void *dso__sym_priv(struct dso *self, struct symbol *sym)
60 return ((void *)sym) - self->sym_priv_size;
63 struct symbol *dso__find_symbol(struct dso *self, u64 ip);
65 int dsos__load_kernel(const char *vmlinux, unsigned int sym_priv_size,
66 symbol_filter_t filter, int verbose, int modules);
67 struct dso *dsos__findnew(const char *name, unsigned int sym_priv_size,
69 int dso__load(struct dso *self, struct map *map,
70 symbol_filter_t filter, int v);
71 void dsos__fprintf(FILE *fp);
73 size_t dso__fprintf(struct dso *self, FILE *fp);
74 char dso__symtab_origin(const struct dso *self);
76 int load_kernel(unsigned int sym_priv_size, symbol_filter_t filter);
78 void symbol__init(void);
80 extern struct list_head dsos;
81 extern struct map *kernel_map;
82 extern struct dso *vdso;
83 extern const char *vmlinux_name;
85 #endif /* __PERF_SYMBOL */