diff options
Diffstat (limited to 'tools/perf/util/dso.h')
-rw-r--r-- | tools/perf/util/dso.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index d51aaf272c68..02aadaf45c63 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h @@ -3,6 +3,7 @@ #include <linux/types.h> #include <linux/rbtree.h> +#include <stdbool.h> #include "types.h" #include "map.h" @@ -146,4 +147,11 @@ size_t dso__fprintf_buildid(struct dso *dso, FILE *fp); size_t dso__fprintf_symbols_by_name(struct dso *dso, enum map_type type, FILE *fp); size_t dso__fprintf(struct dso *dso, enum map_type type, FILE *fp); + +static inline bool dso__is_vmlinux(struct dso *dso) +{ + return dso->data_type == DSO_BINARY_TYPE__VMLINUX || + dso->data_type == DSO_BINARY_TYPE__GUEST_VMLINUX; +} + #endif /* __PERF_DSO */ |