diff options
Diffstat (limited to 'tools/perf/util/dso.h')
-rw-r--r-- | tools/perf/util/dso.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index d51aaf272c68..b793053335d6 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/rbtree.h> | 5 | #include <linux/rbtree.h> |
6 | #include <stdbool.h> | ||
6 | #include "types.h" | 7 | #include "types.h" |
7 | #include "map.h" | 8 | #include "map.h" |
8 | 9 | ||
@@ -20,6 +21,8 @@ enum dso_binary_type { | |||
20 | DSO_BINARY_TYPE__SYSTEM_PATH_DSO, | 21 | DSO_BINARY_TYPE__SYSTEM_PATH_DSO, |
21 | DSO_BINARY_TYPE__GUEST_KMODULE, | 22 | DSO_BINARY_TYPE__GUEST_KMODULE, |
22 | DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE, | 23 | DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE, |
24 | DSO_BINARY_TYPE__KCORE, | ||
25 | DSO_BINARY_TYPE__GUEST_KCORE, | ||
23 | DSO_BINARY_TYPE__NOT_FOUND, | 26 | DSO_BINARY_TYPE__NOT_FOUND, |
24 | }; | 27 | }; |
25 | 28 | ||
@@ -84,6 +87,7 @@ struct dso { | |||
84 | u8 lname_alloc:1; | 87 | u8 lname_alloc:1; |
85 | u8 sorted_by_name; | 88 | u8 sorted_by_name; |
86 | u8 loaded; | 89 | u8 loaded; |
90 | u8 rel; | ||
87 | u8 build_id[BUILD_ID_SIZE]; | 91 | u8 build_id[BUILD_ID_SIZE]; |
88 | const char *short_name; | 92 | const char *short_name; |
89 | char *long_name; | 93 | char *long_name; |
@@ -146,4 +150,17 @@ size_t dso__fprintf_buildid(struct dso *dso, FILE *fp); | |||
146 | size_t dso__fprintf_symbols_by_name(struct dso *dso, | 150 | size_t dso__fprintf_symbols_by_name(struct dso *dso, |
147 | enum map_type type, FILE *fp); | 151 | enum map_type type, FILE *fp); |
148 | size_t dso__fprintf(struct dso *dso, enum map_type type, FILE *fp); | 152 | size_t dso__fprintf(struct dso *dso, enum map_type type, FILE *fp); |
153 | |||
154 | static inline bool dso__is_vmlinux(struct dso *dso) | ||
155 | { | ||
156 | return dso->data_type == DSO_BINARY_TYPE__VMLINUX || | ||
157 | dso->data_type == DSO_BINARY_TYPE__GUEST_VMLINUX; | ||
158 | } | ||
159 | |||
160 | static inline bool dso__is_kcore(struct dso *dso) | ||
161 | { | ||
162 | return dso->data_type == DSO_BINARY_TYPE__KCORE || | ||
163 | dso->data_type == DSO_BINARY_TYPE__GUEST_KCORE; | ||
164 | } | ||
165 | |||
149 | #endif /* __PERF_DSO */ | 166 | #endif /* __PERF_DSO */ |