aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/perf_event.h
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2014-01-02 08:02:06 -0500
committerMichal Marek <mmarek@suse.cz>2014-01-02 08:02:06 -0500
commit37e2c2a775fc887acd1432908478dfd532f7f00f (patch)
treee51ebc699d8e262fd47e0913be6a711cb1a7b565 /include/uapi/linux/perf_event.h
parent1c8ddae09f4c102b97c9086cc70347e89468a547 (diff)
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
Merge commit v3.13-rc1 into kbuild/misc
Diffstat (limited to 'include/uapi/linux/perf_event.h')
-rw-r--r--include/uapi/linux/perf_event.h54
1 files changed, 42 insertions, 12 deletions
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index ca1d90bcb74d..e1802d6153ae 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -136,8 +136,9 @@ enum perf_event_sample_format {
136 PERF_SAMPLE_WEIGHT = 1U << 14, 136 PERF_SAMPLE_WEIGHT = 1U << 14,
137 PERF_SAMPLE_DATA_SRC = 1U << 15, 137 PERF_SAMPLE_DATA_SRC = 1U << 15,
138 PERF_SAMPLE_IDENTIFIER = 1U << 16, 138 PERF_SAMPLE_IDENTIFIER = 1U << 16,
139 PERF_SAMPLE_TRANSACTION = 1U << 17,
139 140
140 PERF_SAMPLE_MAX = 1U << 17, /* non-ABI */ 141 PERF_SAMPLE_MAX = 1U << 18, /* non-ABI */
141}; 142};
142 143
143/* 144/*
@@ -181,6 +182,28 @@ enum perf_sample_regs_abi {
181}; 182};
182 183
183/* 184/*
185 * Values for the memory transaction event qualifier, mostly for
186 * abort events. Multiple bits can be set.
187 */
188enum {
189 PERF_TXN_ELISION = (1 << 0), /* From elision */
190 PERF_TXN_TRANSACTION = (1 << 1), /* From transaction */
191 PERF_TXN_SYNC = (1 << 2), /* Instruction is related */
192 PERF_TXN_ASYNC = (1 << 3), /* Instruction not related */
193 PERF_TXN_RETRY = (1 << 4), /* Retry possible */
194 PERF_TXN_CONFLICT = (1 << 5), /* Conflict abort */
195 PERF_TXN_CAPACITY_WRITE = (1 << 6), /* Capacity write abort */
196 PERF_TXN_CAPACITY_READ = (1 << 7), /* Capacity read abort */
197
198 PERF_TXN_MAX = (1 << 8), /* non-ABI */
199
200 /* bits 32..63 are reserved for the abort code */
201
202 PERF_TXN_ABORT_MASK = (0xffffffffULL << 32),
203 PERF_TXN_ABORT_SHIFT = 32,
204};
205
206/*
184 * The format of the data returned by read() on a perf event fd, 207 * The format of the data returned by read() on a perf event fd,
185 * as specified by attr.read_format: 208 * as specified by attr.read_format:
186 * 209 *
@@ -324,7 +347,7 @@ struct perf_event_attr {
324#define PERF_EVENT_IOC_PERIOD _IOW('$', 4, __u64) 347#define PERF_EVENT_IOC_PERIOD _IOW('$', 4, __u64)
325#define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) 348#define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5)
326#define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *) 349#define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *)
327#define PERF_EVENT_IOC_ID _IOR('$', 7, u64 *) 350#define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *)
328 351
329enum perf_event_ioc_flags { 352enum perf_event_ioc_flags {
330 PERF_IOC_FLAG_GROUP = 1U << 0, 353 PERF_IOC_FLAG_GROUP = 1U << 0,
@@ -380,10 +403,13 @@ struct perf_event_mmap_page {
380 union { 403 union {
381 __u64 capabilities; 404 __u64 capabilities;
382 struct { 405 struct {
383 __u64 cap_usr_time : 1, 406 __u64 cap_bit0 : 1, /* Always 0, deprecated, see commit 860f085b74e9 */
384 cap_usr_rdpmc : 1, 407 cap_bit0_is_deprecated : 1, /* Always 1, signals that bit 0 is zero */
385 cap_usr_time_zero : 1, 408
386 cap_____res : 61; 409 cap_user_rdpmc : 1, /* The RDPMC instruction can be used to read counts */
410 cap_user_time : 1, /* The time_* fields are used */
411 cap_user_time_zero : 1, /* The time_zero field is used */
412 cap_____res : 59;
387 }; 413 };
388 }; 414 };
389 415
@@ -442,23 +468,26 @@ struct perf_event_mmap_page {
442 * ((rem * time_mult) >> time_shift); 468 * ((rem * time_mult) >> time_shift);
443 */ 469 */
444 __u64 time_zero; 470 __u64 time_zero;
471 __u32 size; /* Header size up to __reserved[] fields. */
445 472
446 /* 473 /*
447 * Hole for extension of the self monitor capabilities 474 * Hole for extension of the self monitor capabilities
448 */ 475 */
449 476
450 __u64 __reserved[119]; /* align to 1k */ 477 __u8 __reserved[118*8+4]; /* align to 1k. */
451 478
452 /* 479 /*
453 * Control data for the mmap() data buffer. 480 * Control data for the mmap() data buffer.
454 * 481 *
455 * User-space reading the @data_head value should issue an rmb(), on 482 * User-space reading the @data_head value should issue an smp_rmb(),
456 * SMP capable platforms, after reading this value -- see 483 * after reading this value.
457 * perf_event_wakeup().
458 * 484 *
459 * When the mapping is PROT_WRITE the @data_tail value should be 485 * When the mapping is PROT_WRITE the @data_tail value should be
460 * written by userspace to reflect the last read data. In this case 486 * written by userspace to reflect the last read data, after issueing
461 * the kernel will not over-write unread data. 487 * an smp_mb() to separate the data read from the ->data_tail store.
488 * In this case the kernel will not over-write unread data.
489 *
490 * See perf_output_put_handle() for the data ordering.
462 */ 491 */
463 __u64 data_head; /* head in the data section */ 492 __u64 data_head; /* head in the data section */
464 __u64 data_tail; /* user-space written tail */ 493 __u64 data_tail; /* user-space written tail */
@@ -528,6 +557,7 @@ enum perf_event_type {
528 * u64 len; 557 * u64 len;
529 * u64 pgoff; 558 * u64 pgoff;
530 * char filename[]; 559 * char filename[];
560 * struct sample_id sample_id;
531 * }; 561 * };
532 */ 562 */
533 PERF_RECORD_MMAP = 1, 563 PERF_RECORD_MMAP = 1,