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.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 17003efa0b39..cf99f88adf39 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -52,7 +52,8 @@ struct symbol {
52struct symbol_conf { 52struct symbol_conf {
53 unsigned short priv_size; 53 unsigned short priv_size;
54 bool try_vmlinux_path, 54 bool try_vmlinux_path,
55 use_modules; 55 use_modules,
56 sort_by_name;
56 const char *vmlinux_name; 57 const char *vmlinux_name;
57}; 58};
58 59
@@ -74,13 +75,13 @@ struct addr_location {
74struct dso { 75struct dso {
75 struct list_head node; 76 struct list_head node;
76 struct rb_root symbols[MAP__NR_TYPES]; 77 struct rb_root symbols[MAP__NR_TYPES];
77 struct symbol *(*find_symbol)(struct dso *self, 78 struct rb_root symbol_names[MAP__NR_TYPES];
78 enum map_type type, u64 addr);
79 u8 adjust_symbols:1; 79 u8 adjust_symbols:1;
80 u8 slen_calculated:1; 80 u8 slen_calculated:1;
81 u8 has_build_id:1; 81 u8 has_build_id:1;
82 u8 kernel:1; 82 u8 kernel:1;
83 unsigned char origin; 83 unsigned char origin;
84 u8 sorted_by_name;
84 u8 loaded; 85 u8 loaded;
85 u8 build_id[BUILD_ID_SIZE]; 86 u8 build_id[BUILD_ID_SIZE];
86 u16 long_name_len; 87 u16 long_name_len;
@@ -93,6 +94,9 @@ struct dso *dso__new(const char *name);
93void dso__delete(struct dso *self); 94void dso__delete(struct dso *self);
94 95
95bool dso__loaded(const struct dso *self, enum map_type type); 96bool dso__loaded(const struct dso *self, enum map_type type);
97bool dso__sorted_by_name(const struct dso *self, enum map_type type);
98
99void dso__sort_by_name(struct dso *self, enum map_type type);
96 100
97struct dso *dsos__findnew(const char *name); 101struct dso *dsos__findnew(const char *name);
98int dso__load(struct dso *self, struct map *map, symbol_filter_t filter); 102int dso__load(struct dso *self, struct map *map, symbol_filter_t filter);
@@ -103,6 +107,9 @@ size_t dso__fprintf_buildid(struct dso *self, FILE *fp);
103size_t dso__fprintf(struct dso *self, enum map_type type, FILE *fp); 107size_t dso__fprintf(struct dso *self, enum map_type type, FILE *fp);
104char dso__symtab_origin(const struct dso *self); 108char dso__symtab_origin(const struct dso *self);
105void dso__set_build_id(struct dso *self, void *build_id); 109void dso__set_build_id(struct dso *self, void *build_id);
110struct symbol *dso__find_symbol(struct dso *self, enum map_type type, u64 addr);
111struct symbol *dso__find_symbol_by_name(struct dso *self, enum map_type type,
112 const char *name);
106 113
107int filename__read_build_id(const char *filename, void *bf, size_t size); 114int filename__read_build_id(const char *filename, void *bf, size_t size);
108int sysfs__read_build_id(const char *filename, void *bf, size_t size); 115int sysfs__read_build_id(const char *filename, void *bf, size_t size);
@@ -113,8 +120,8 @@ size_t kernel_maps__fprintf(FILE *fp);
113 120
114int symbol__init(struct symbol_conf *conf); 121int symbol__init(struct symbol_conf *conf);
115 122
116struct thread; 123struct map_groups;
117struct thread *kthread; 124struct map_groups *kmaps;
118extern struct list_head dsos__user, dsos__kernel; 125extern struct list_head dsos__user, dsos__kernel;
119extern struct dso *vdso; 126extern struct dso *vdso;
120#endif /* __PERF_SYMBOL */ 127#endif /* __PERF_SYMBOL */