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.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index 5699e7e2a790..7be389735402 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -143,6 +143,32 @@ struct branch_stack {
143 struct branch_entry entries[0]; 143 struct branch_entry entries[0];
144}; 144};
145 145
146enum {
147 PERF_IP_FLAG_BRANCH = 1ULL << 0,
148 PERF_IP_FLAG_CALL = 1ULL << 1,
149 PERF_IP_FLAG_RETURN = 1ULL << 2,
150 PERF_IP_FLAG_CONDITIONAL = 1ULL << 3,
151 PERF_IP_FLAG_SYSCALLRET = 1ULL << 4,
152 PERF_IP_FLAG_ASYNC = 1ULL << 5,
153 PERF_IP_FLAG_INTERRUPT = 1ULL << 6,
154 PERF_IP_FLAG_TX_ABORT = 1ULL << 7,
155 PERF_IP_FLAG_TRACE_BEGIN = 1ULL << 8,
156 PERF_IP_FLAG_TRACE_END = 1ULL << 9,
157 PERF_IP_FLAG_IN_TX = 1ULL << 10,
158};
159
160#define PERF_BRANCH_MASK (\
161 PERF_IP_FLAG_BRANCH |\
162 PERF_IP_FLAG_CALL |\
163 PERF_IP_FLAG_RETURN |\
164 PERF_IP_FLAG_CONDITIONAL |\
165 PERF_IP_FLAG_SYSCALLRET |\
166 PERF_IP_FLAG_ASYNC |\
167 PERF_IP_FLAG_INTERRUPT |\
168 PERF_IP_FLAG_TX_ABORT |\
169 PERF_IP_FLAG_TRACE_BEGIN |\
170 PERF_IP_FLAG_TRACE_END)
171
146struct perf_sample { 172struct perf_sample {
147 u64 ip; 173 u64 ip;
148 u32 pid, tid; 174 u32 pid, tid;
@@ -187,6 +213,7 @@ enum perf_user_event_type { /* above any possible kernel type */
187 PERF_RECORD_HEADER_TRACING_DATA = 66, 213 PERF_RECORD_HEADER_TRACING_DATA = 66,
188 PERF_RECORD_HEADER_BUILD_ID = 67, 214 PERF_RECORD_HEADER_BUILD_ID = 67,
189 PERF_RECORD_FINISHED_ROUND = 68, 215 PERF_RECORD_FINISHED_ROUND = 68,
216 PERF_RECORD_ID_INDEX = 69,
190 PERF_RECORD_HEADER_MAX 217 PERF_RECORD_HEADER_MAX
191}; 218};
192 219
@@ -239,6 +266,19 @@ struct tracing_data_event {
239 u32 size; 266 u32 size;
240}; 267};
241 268
269struct id_index_entry {
270 u64 id;
271 u64 idx;
272 u64 cpu;
273 u64 tid;
274};
275
276struct id_index_event {
277 struct perf_event_header header;
278 u64 nr;
279 struct id_index_entry entries[0];
280};
281
242union perf_event { 282union perf_event {
243 struct perf_event_header header; 283 struct perf_event_header header;
244 struct mmap_event mmap; 284 struct mmap_event mmap;
@@ -253,6 +293,7 @@ union perf_event {
253 struct event_type_event event_type; 293 struct event_type_event event_type;
254 struct tracing_data_event tracing_data; 294 struct tracing_data_event tracing_data;
255 struct build_id_event build_id; 295 struct build_id_event build_id;
296 struct id_index_event id_index;
256}; 297};
257 298
258void perf_event__print_totals(void); 299void perf_event__print_totals(void);
@@ -322,7 +363,6 @@ bool is_bts_event(struct perf_event_attr *attr);
322bool sample_addr_correlates_sym(struct perf_event_attr *attr); 363bool sample_addr_correlates_sym(struct perf_event_attr *attr);
323void perf_event__preprocess_sample_addr(union perf_event *event, 364void perf_event__preprocess_sample_addr(union perf_event *event,
324 struct perf_sample *sample, 365 struct perf_sample *sample,
325 struct machine *machine,
326 struct thread *thread, 366 struct thread *thread,
327 struct addr_location *al); 367 struct addr_location *al);
328 368