diff options
Diffstat (limited to 'tools/perf/util/dso.h')
| -rw-r--r-- | tools/perf/util/dso.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index 9ac666abbe7e..cd7d6f078cdd 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h | |||
| @@ -77,23 +77,26 @@ struct dso { | |||
| 77 | struct rb_root symbols[MAP__NR_TYPES]; | 77 | struct rb_root symbols[MAP__NR_TYPES]; |
| 78 | struct rb_root symbol_names[MAP__NR_TYPES]; | 78 | struct rb_root symbol_names[MAP__NR_TYPES]; |
| 79 | struct rb_root cache; | 79 | struct rb_root cache; |
| 80 | void *a2l; | ||
| 81 | char *symsrc_filename; | ||
| 82 | unsigned int a2l_fails; | ||
| 80 | enum dso_kernel_type kernel; | 83 | enum dso_kernel_type kernel; |
| 81 | enum dso_swap_type needs_swap; | 84 | enum dso_swap_type needs_swap; |
| 82 | enum dso_binary_type symtab_type; | 85 | enum dso_binary_type symtab_type; |
| 83 | enum dso_binary_type data_type; | 86 | enum dso_binary_type binary_type; |
| 84 | u8 adjust_symbols:1; | 87 | u8 adjust_symbols:1; |
| 85 | u8 has_build_id:1; | 88 | u8 has_build_id:1; |
| 86 | u8 has_srcline:1; | 89 | u8 has_srcline:1; |
| 87 | u8 hit:1; | 90 | u8 hit:1; |
| 88 | u8 annotate_warned:1; | 91 | u8 annotate_warned:1; |
| 89 | u8 sname_alloc:1; | 92 | u8 short_name_allocated:1; |
| 90 | u8 lname_alloc:1; | 93 | u8 long_name_allocated:1; |
| 91 | u8 sorted_by_name; | 94 | u8 sorted_by_name; |
| 92 | u8 loaded; | 95 | u8 loaded; |
| 93 | u8 rel; | 96 | u8 rel; |
| 94 | u8 build_id[BUILD_ID_SIZE]; | 97 | u8 build_id[BUILD_ID_SIZE]; |
| 95 | const char *short_name; | 98 | const char *short_name; |
| 96 | char *long_name; | 99 | const char *long_name; |
| 97 | u16 long_name_len; | 100 | u16 long_name_len; |
| 98 | u16 short_name_len; | 101 | u16 short_name_len; |
| 99 | char name[0]; | 102 | char name[0]; |
| @@ -107,8 +110,8 @@ static inline void dso__set_loaded(struct dso *dso, enum map_type type) | |||
| 107 | struct dso *dso__new(const char *name); | 110 | struct dso *dso__new(const char *name); |
| 108 | void dso__delete(struct dso *dso); | 111 | void dso__delete(struct dso *dso); |
| 109 | 112 | ||
| 110 | void dso__set_short_name(struct dso *dso, const char *name); | 113 | void dso__set_short_name(struct dso *dso, const char *name, bool name_allocated); |
| 111 | void dso__set_long_name(struct dso *dso, char *name); | 114 | void dso__set_long_name(struct dso *dso, const char *name, bool name_allocated); |
| 112 | 115 | ||
| 113 | int dso__name_len(const struct dso *dso); | 116 | int dso__name_len(const struct dso *dso); |
| 114 | 117 | ||
| @@ -125,8 +128,8 @@ void dso__read_running_kernel_build_id(struct dso *dso, | |||
| 125 | int dso__kernel_module_get_build_id(struct dso *dso, const char *root_dir); | 128 | int dso__kernel_module_get_build_id(struct dso *dso, const char *root_dir); |
| 126 | 129 | ||
| 127 | char dso__symtab_origin(const struct dso *dso); | 130 | char dso__symtab_origin(const struct dso *dso); |
| 128 | int dso__binary_type_file(struct dso *dso, enum dso_binary_type type, | 131 | int dso__read_binary_type_filename(const struct dso *dso, enum dso_binary_type type, |
| 129 | char *root_dir, char *file, size_t size); | 132 | char *root_dir, char *filename, size_t size); |
| 130 | 133 | ||
| 131 | int dso__data_fd(struct dso *dso, struct machine *machine); | 134 | int dso__data_fd(struct dso *dso, struct machine *machine); |
| 132 | ssize_t dso__data_read_offset(struct dso *dso, struct machine *machine, | 135 | ssize_t dso__data_read_offset(struct dso *dso, struct machine *machine, |
| @@ -140,7 +143,7 @@ struct dso *dso__kernel_findnew(struct machine *machine, const char *name, | |||
| 140 | const char *short_name, int dso_type); | 143 | const char *short_name, int dso_type); |
| 141 | 144 | ||
| 142 | void dsos__add(struct list_head *head, struct dso *dso); | 145 | void dsos__add(struct list_head *head, struct dso *dso); |
| 143 | struct dso *dsos__find(struct list_head *head, const char *name, | 146 | struct dso *dsos__find(const struct list_head *head, const char *name, |
| 144 | bool cmp_short); | 147 | bool cmp_short); |
| 145 | struct dso *__dsos__findnew(struct list_head *head, const char *name); | 148 | struct dso *__dsos__findnew(struct list_head *head, const char *name); |
| 146 | bool __dsos__read_build_ids(struct list_head *head, bool with_hits); | 149 | bool __dsos__read_build_ids(struct list_head *head, bool with_hits); |
| @@ -156,14 +159,16 @@ size_t dso__fprintf(struct dso *dso, enum map_type type, FILE *fp); | |||
| 156 | 159 | ||
| 157 | static inline bool dso__is_vmlinux(struct dso *dso) | 160 | static inline bool dso__is_vmlinux(struct dso *dso) |
| 158 | { | 161 | { |
| 159 | return dso->data_type == DSO_BINARY_TYPE__VMLINUX || | 162 | return dso->binary_type == DSO_BINARY_TYPE__VMLINUX || |
| 160 | dso->data_type == DSO_BINARY_TYPE__GUEST_VMLINUX; | 163 | dso->binary_type == DSO_BINARY_TYPE__GUEST_VMLINUX; |
| 161 | } | 164 | } |
| 162 | 165 | ||
| 163 | static inline bool dso__is_kcore(struct dso *dso) | 166 | static inline bool dso__is_kcore(struct dso *dso) |
| 164 | { | 167 | { |
| 165 | return dso->data_type == DSO_BINARY_TYPE__KCORE || | 168 | return dso->binary_type == DSO_BINARY_TYPE__KCORE || |
| 166 | dso->data_type == DSO_BINARY_TYPE__GUEST_KCORE; | 169 | dso->binary_type == DSO_BINARY_TYPE__GUEST_KCORE; |
| 167 | } | 170 | } |
| 168 | 171 | ||
| 172 | void dso__free_a2l(struct dso *dso); | ||
| 173 | |||
| 169 | #endif /* __PERF_DSO */ | 174 | #endif /* __PERF_DSO */ |
