diff options
Diffstat (limited to 'tools/perf/util/header.h')
-rw-r--r-- | tools/perf/util/header.h | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h index 82a6af72d4cc..402ac2454cf8 100644 --- a/tools/perf/util/header.h +++ b/tools/perf/util/header.h | |||
@@ -39,6 +39,11 @@ struct perf_file_header { | |||
39 | DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS); | 39 | DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS); |
40 | }; | 40 | }; |
41 | 41 | ||
42 | struct perf_pipe_file_header { | ||
43 | u64 magic; | ||
44 | u64 size; | ||
45 | }; | ||
46 | |||
42 | struct perf_header; | 47 | struct perf_header; |
43 | 48 | ||
44 | int perf_file_header__read(struct perf_file_header *self, | 49 | int perf_file_header__read(struct perf_file_header *self, |
@@ -47,21 +52,22 @@ int perf_file_header__read(struct perf_file_header *self, | |||
47 | struct perf_header { | 52 | struct perf_header { |
48 | int frozen; | 53 | int frozen; |
49 | int attrs, size; | 54 | int attrs, size; |
55 | bool needs_swap; | ||
50 | struct perf_header_attr **attr; | 56 | struct perf_header_attr **attr; |
51 | s64 attr_offset; | 57 | s64 attr_offset; |
52 | u64 data_offset; | 58 | u64 data_offset; |
53 | u64 data_size; | 59 | u64 data_size; |
54 | u64 event_offset; | 60 | u64 event_offset; |
55 | u64 event_size; | 61 | u64 event_size; |
56 | bool needs_swap; | ||
57 | DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS); | 62 | DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS); |
58 | }; | 63 | }; |
59 | 64 | ||
60 | int perf_header__init(struct perf_header *self); | 65 | int perf_header__init(struct perf_header *self); |
61 | void perf_header__exit(struct perf_header *self); | 66 | void perf_header__exit(struct perf_header *self); |
62 | 67 | ||
63 | int perf_header__read(struct perf_header *self, int fd); | 68 | int perf_header__read(struct perf_session *session, int fd); |
64 | int perf_header__write(struct perf_header *self, int fd, bool at_exit); | 69 | int perf_header__write(struct perf_header *self, int fd, bool at_exit); |
70 | int perf_header__write_pipe(int fd); | ||
65 | 71 | ||
66 | int perf_header__add_attr(struct perf_header *self, | 72 | int perf_header__add_attr(struct perf_header *self, |
67 | struct perf_header_attr *attr); | 73 | struct perf_header_attr *attr); |
@@ -89,4 +95,33 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, | |||
89 | const char *name, bool is_kallsyms); | 95 | const char *name, bool is_kallsyms); |
90 | int build_id_cache__remove_s(const char *sbuild_id, const char *debugdir); | 96 | int build_id_cache__remove_s(const char *sbuild_id, const char *debugdir); |
91 | 97 | ||
98 | int event__synthesize_attr(struct perf_event_attr *attr, u16 ids, u64 *id, | ||
99 | event__handler_t process, | ||
100 | struct perf_session *session); | ||
101 | int event__synthesize_attrs(struct perf_header *self, | ||
102 | event__handler_t process, | ||
103 | struct perf_session *session); | ||
104 | int event__process_attr(event_t *self, struct perf_session *session); | ||
105 | |||
106 | int event__synthesize_event_type(u64 event_id, char *name, | ||
107 | event__handler_t process, | ||
108 | struct perf_session *session); | ||
109 | int event__synthesize_event_types(event__handler_t process, | ||
110 | struct perf_session *session); | ||
111 | int event__process_event_type(event_t *self, | ||
112 | struct perf_session *session); | ||
113 | |||
114 | int event__synthesize_tracing_data(int fd, struct perf_event_attr *pattrs, | ||
115 | int nb_events, | ||
116 | event__handler_t process, | ||
117 | struct perf_session *session); | ||
118 | int event__process_tracing_data(event_t *self, | ||
119 | struct perf_session *session); | ||
120 | |||
121 | int event__synthesize_build_id(struct dso *pos, u16 misc, | ||
122 | event__handler_t process, | ||
123 | struct machine *machine, | ||
124 | struct perf_session *session); | ||
125 | int event__process_build_id(event_t *self, struct perf_session *session); | ||
126 | |||
92 | #endif /* __PERF_HEADER_H */ | 127 | #endif /* __PERF_HEADER_H */ |