diff options
Diffstat (limited to 'tools/perf/util/header.h')
-rw-r--r-- | tools/perf/util/header.h | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h index a0761bc7863c..2ea9dfb1236a 100644 --- a/tools/perf/util/header.h +++ b/tools/perf/util/header.h | |||
@@ -1,10 +1,12 @@ | |||
1 | #ifndef _PERF_HEADER_H | 1 | #ifndef __PERF_HEADER_H |
2 | #define _PERF_HEADER_H | 2 | #define __PERF_HEADER_H |
3 | 3 | ||
4 | #include "../../../include/linux/perf_event.h" | 4 | #include "../../../include/linux/perf_event.h" |
5 | #include <sys/types.h> | 5 | #include <sys/types.h> |
6 | #include "types.h" | 6 | #include "types.h" |
7 | 7 | ||
8 | #include <linux/bitmap.h> | ||
9 | |||
8 | struct perf_header_attr { | 10 | struct perf_header_attr { |
9 | struct perf_event_attr attr; | 11 | struct perf_event_attr attr; |
10 | int ids, size; | 12 | int ids, size; |
@@ -12,15 +14,20 @@ struct perf_header_attr { | |||
12 | off_t id_offset; | 14 | off_t id_offset; |
13 | }; | 15 | }; |
14 | 16 | ||
17 | #define HEADER_TRACE_INFO 1 | ||
18 | |||
19 | #define HEADER_FEAT_BITS 256 | ||
20 | |||
15 | struct perf_header { | 21 | struct perf_header { |
16 | int frozen; | 22 | int frozen; |
17 | int attrs, size; | 23 | int attrs, size; |
18 | struct perf_header_attr **attr; | 24 | struct perf_header_attr **attr; |
19 | s64 attr_offset; | 25 | s64 attr_offset; |
20 | u64 data_offset; | 26 | u64 data_offset; |
21 | u64 data_size; | 27 | u64 data_size; |
22 | u64 event_offset; | 28 | u64 event_offset; |
23 | u64 event_size; | 29 | u64 event_size; |
30 | DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS); | ||
24 | }; | 31 | }; |
25 | 32 | ||
26 | struct perf_header *perf_header__read(int fd); | 33 | struct perf_header *perf_header__read(int fd); |
@@ -40,8 +47,8 @@ void perf_header_attr__add_id(struct perf_header_attr *self, u64 id); | |||
40 | u64 perf_header__sample_type(struct perf_header *header); | 47 | u64 perf_header__sample_type(struct perf_header *header); |
41 | struct perf_event_attr * | 48 | struct perf_event_attr * |
42 | perf_header__find_attr(u64 id, struct perf_header *header); | 49 | perf_header__find_attr(u64 id, struct perf_header *header); |
43 | 50 | void perf_header__feat_trace_info(struct perf_header *header); | |
44 | 51 | ||
45 | struct perf_header *perf_header__new(void); | 52 | struct perf_header *perf_header__new(void); |
46 | 53 | ||
47 | #endif /* _PERF_HEADER_H */ | 54 | #endif /* __PERF_HEADER_H */ |