aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r--tools/perf/util/symbol.h38
1 files changed, 34 insertions, 4 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 2c48ace8203b..b53bf0125c1b 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -3,8 +3,33 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include "types.h" 5#include "types.h"
6#include "list.h" 6#include <linux/list.h>
7#include "rbtree.h" 7#include <linux/rbtree.h>
8#include "module.h"
9
10#ifdef HAVE_CPLUS_DEMANGLE
11extern char *cplus_demangle(const char *, int);
12
13static inline char *bfd_demangle(void __used *v, const char *c, int i)
14{
15 return cplus_demangle(c, i);
16}
17#else
18#ifdef NO_DEMANGLE
19static inline char *bfd_demangle(void __used *v, const char __used *c,
20 int __used i)
21{
22 return NULL;
23}
24#else
25#include <bfd.h>
26#endif
27#endif
28
29#ifndef DMGL_PARAMS
30#define DMGL_PARAMS (1 << 0) /* Include function args */
31#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
32#endif
8 33
9struct symbol { 34struct symbol {
10 struct rb_node rb_node; 35 struct rb_node rb_node;
@@ -13,6 +38,7 @@ struct symbol {
13 u64 obj_start; 38 u64 obj_start;
14 u64 hist_sum; 39 u64 hist_sum;
15 u64 *hist; 40 u64 *hist;
41 struct module *module;
16 void *priv; 42 void *priv;
17 char name[0]; 43 char name[0];
18}; 44};
@@ -22,7 +48,9 @@ struct dso {
22 struct rb_root syms; 48 struct rb_root syms;
23 struct symbol *(*find_symbol)(struct dso *, u64 ip); 49 struct symbol *(*find_symbol)(struct dso *, u64 ip);
24 unsigned int sym_priv_size; 50 unsigned int sym_priv_size;
25 unsigned char prelinked; 51 unsigned char adjust_symbols;
52 unsigned char slen_calculated;
53 unsigned char origin;
26 char name[0]; 54 char name[0];
27}; 55};
28 56
@@ -41,10 +69,12 @@ static inline void *dso__sym_priv(struct dso *self, struct symbol *sym)
41struct symbol *dso__find_symbol(struct dso *self, u64 ip); 69struct symbol *dso__find_symbol(struct dso *self, u64 ip);
42 70
43int dso__load_kernel(struct dso *self, const char *vmlinux, 71int dso__load_kernel(struct dso *self, const char *vmlinux,
44 symbol_filter_t filter, int verbose); 72 symbol_filter_t filter, int verbose, int modules);
73int dso__load_modules(struct dso *self, symbol_filter_t filter, int verbose);
45int dso__load(struct dso *self, symbol_filter_t filter, int verbose); 74int dso__load(struct dso *self, symbol_filter_t filter, int verbose);
46 75
47size_t dso__fprintf(struct dso *self, FILE *fp); 76size_t dso__fprintf(struct dso *self, FILE *fp);
77char dso__symtab_origin(const struct dso *self);
48 78
49void symbol__init(void); 79void symbol__init(void);
50#endif /* _PERF_SYMBOL_ */ 80#endif /* _PERF_SYMBOL_ */