aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/event.h')
-rw-r--r--tools/perf/util/event.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index c67ecc457d29..30fec9901e44 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -61,6 +61,12 @@ struct read_event {
61 u64 id; 61 u64 id;
62}; 62};
63 63
64struct throttle_event {
65 struct perf_event_header header;
66 u64 time;
67 u64 id;
68 u64 stream_id;
69};
64 70
65#define PERF_SAMPLE_MASK \ 71#define PERF_SAMPLE_MASK \
66 (PERF_SAMPLE_IP | PERF_SAMPLE_TID | \ 72 (PERF_SAMPLE_IP | PERF_SAMPLE_TID | \
@@ -69,6 +75,9 @@ struct read_event {
69 PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD | \ 75 PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD | \
70 PERF_SAMPLE_IDENTIFIER) 76 PERF_SAMPLE_IDENTIFIER)
71 77
78/* perf sample has 16 bits size limit */
79#define PERF_SAMPLE_MAX_SIZE (1 << 16)
80
72struct sample_event { 81struct sample_event {
73 struct perf_event_header header; 82 struct perf_event_header header;
74 u64 array[]; 83 u64 array[];
@@ -111,6 +120,7 @@ struct perf_sample {
111 u64 stream_id; 120 u64 stream_id;
112 u64 period; 121 u64 period;
113 u64 weight; 122 u64 weight;
123 u64 transaction;
114 u32 cpu; 124 u32 cpu;
115 u32 raw_size; 125 u32 raw_size;
116 u64 data_src; 126 u64 data_src;
@@ -177,6 +187,7 @@ union perf_event {
177 struct fork_event fork; 187 struct fork_event fork;
178 struct lost_event lost; 188 struct lost_event lost;
179 struct read_event read; 189 struct read_event read;
190 struct throttle_event throttle;
180 struct sample_event sample; 191 struct sample_event sample;
181 struct attr_event attr; 192 struct attr_event attr;
182 struct event_type_event event_type; 193 struct event_type_event event_type;
@@ -197,10 +208,10 @@ typedef int (*perf_event__handler_t)(struct perf_tool *tool,
197int perf_event__synthesize_thread_map(struct perf_tool *tool, 208int perf_event__synthesize_thread_map(struct perf_tool *tool,
198 struct thread_map *threads, 209 struct thread_map *threads,
199 perf_event__handler_t process, 210 perf_event__handler_t process,
200 struct machine *machine); 211 struct machine *machine, bool mmap_data);
201int perf_event__synthesize_threads(struct perf_tool *tool, 212int perf_event__synthesize_threads(struct perf_tool *tool,
202 perf_event__handler_t process, 213 perf_event__handler_t process,
203 struct machine *machine); 214 struct machine *machine, bool mmap_data);
204int perf_event__synthesize_kernel_mmap(struct perf_tool *tool, 215int perf_event__synthesize_kernel_mmap(struct perf_tool *tool,
205 perf_event__handler_t process, 216 perf_event__handler_t process,
206 struct machine *machine, 217 struct machine *machine,
@@ -240,7 +251,8 @@ int perf_event__process(struct perf_tool *tool,
240 struct machine *machine); 251 struct machine *machine);
241 252
242struct addr_location; 253struct addr_location;
243int perf_event__preprocess_sample(const union perf_event *self, 254
255int perf_event__preprocess_sample(const union perf_event *event,
244 struct machine *machine, 256 struct machine *machine,
245 struct addr_location *al, 257 struct addr_location *al,
246 struct perf_sample *sample); 258 struct perf_sample *sample);