aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/annotate.h')
-rw-r--r--tools/perf/util/annotate.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index 2b9e3e038a84..13a21f10dabb 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -2,6 +2,7 @@
2#define __PERF_ANNOTATE_H 2#define __PERF_ANNOTATE_H
3 3
4#include <stdbool.h> 4#include <stdbool.h>
5#include <stdint.h>
5#include "types.h" 6#include "types.h"
6#include "symbol.h" 7#include "symbol.h"
7#include <linux/list.h> 8#include <linux/list.h>
@@ -41,6 +42,11 @@ struct disasm_line {
41 struct ins_operands ops; 42 struct ins_operands ops;
42}; 43};
43 44
45static inline bool disasm_line__has_offset(const struct disasm_line *dl)
46{
47 return dl->ops.target.offset != UINT64_MAX;
48}
49
44void disasm_line__free(struct disasm_line *dl); 50void disasm_line__free(struct disasm_line *dl);
45struct disasm_line *disasm__get_next_ip_line(struct list_head *head, struct disasm_line *pos); 51struct disasm_line *disasm__get_next_ip_line(struct list_head *head, struct disasm_line *pos);
46size_t disasm__fprintf(struct list_head *head, FILE *fp); 52size_t disasm__fprintf(struct list_head *head, FILE *fp);