blob: a88df0879355aa4d26dc848153d97382936ff0ca [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_PERF_EVENT_H
20#define _UAPI_LINUX_PERF_EVENT_H
21#include <linux/types.h>
22#include <linux/ioctl.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <asm/byteorder.h>
25enum perf_type_id {
26 PERF_TYPE_HARDWARE = 0,
27 PERF_TYPE_SOFTWARE = 1,
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 PERF_TYPE_TRACEPOINT = 2,
30 PERF_TYPE_HW_CACHE = 3,
31 PERF_TYPE_RAW = 4,
32 PERF_TYPE_BREAKPOINT = 5,
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 PERF_TYPE_MAX,
35};
36enum perf_hw_id {
37 PERF_COUNT_HW_CPU_CYCLES = 0,
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 PERF_COUNT_HW_INSTRUCTIONS = 1,
40 PERF_COUNT_HW_CACHE_REFERENCES = 2,
41 PERF_COUNT_HW_CACHE_MISSES = 3,
42 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4,
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 PERF_COUNT_HW_BRANCH_MISSES = 5,
45 PERF_COUNT_HW_BUS_CYCLES = 6,
46 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7,
47 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8,
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 PERF_COUNT_HW_REF_CPU_CYCLES = 9,
50 PERF_COUNT_HW_MAX,
51};
52enum perf_hw_cache_id {
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 PERF_COUNT_HW_CACHE_L1D = 0,
55 PERF_COUNT_HW_CACHE_L1I = 1,
56 PERF_COUNT_HW_CACHE_LL = 2,
57 PERF_COUNT_HW_CACHE_DTLB = 3,
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 PERF_COUNT_HW_CACHE_ITLB = 4,
60 PERF_COUNT_HW_CACHE_BPU = 5,
61 PERF_COUNT_HW_CACHE_NODE = 6,
62 PERF_COUNT_HW_CACHE_MAX,
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64};
65enum perf_hw_cache_op_id {
66 PERF_COUNT_HW_CACHE_OP_READ = 0,
67 PERF_COUNT_HW_CACHE_OP_WRITE = 1,
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 PERF_COUNT_HW_CACHE_OP_PREFETCH = 2,
70 PERF_COUNT_HW_CACHE_OP_MAX,
71};
72enum perf_hw_cache_op_result_id {
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0,
75 PERF_COUNT_HW_CACHE_RESULT_MISS = 1,
76 PERF_COUNT_HW_CACHE_RESULT_MAX,
77};
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79enum perf_sw_ids {
80 PERF_COUNT_SW_CPU_CLOCK = 0,
81 PERF_COUNT_SW_TASK_CLOCK = 1,
82 PERF_COUNT_SW_PAGE_FAULTS = 2,
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 PERF_COUNT_SW_CONTEXT_SWITCHES = 3,
85 PERF_COUNT_SW_CPU_MIGRATIONS = 4,
86 PERF_COUNT_SW_PAGE_FAULTS_MIN = 5,
87 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6,
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 PERF_COUNT_SW_ALIGNMENT_FAULTS = 7,
90 PERF_COUNT_SW_EMULATION_FAULTS = 8,
Christopher Ferris38062f92014-07-09 15:33:25 -070091 PERF_COUNT_SW_DUMMY = 9,
Ben Cheng655a7c02013-10-16 16:09:24 -070092 PERF_COUNT_SW_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070094};
Ben Cheng655a7c02013-10-16 16:09:24 -070095enum perf_event_sample_format {
96 PERF_SAMPLE_IP = 1U << 0,
97 PERF_SAMPLE_TID = 1U << 1,
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070099 PERF_SAMPLE_TIME = 1U << 2,
Ben Cheng655a7c02013-10-16 16:09:24 -0700100 PERF_SAMPLE_ADDR = 1U << 3,
101 PERF_SAMPLE_READ = 1U << 4,
102 PERF_SAMPLE_CALLCHAIN = 1U << 5,
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700104 PERF_SAMPLE_ID = 1U << 6,
Ben Cheng655a7c02013-10-16 16:09:24 -0700105 PERF_SAMPLE_CPU = 1U << 7,
106 PERF_SAMPLE_PERIOD = 1U << 8,
107 PERF_SAMPLE_STREAM_ID = 1U << 9,
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700109 PERF_SAMPLE_RAW = 1U << 10,
Ben Cheng655a7c02013-10-16 16:09:24 -0700110 PERF_SAMPLE_BRANCH_STACK = 1U << 11,
111 PERF_SAMPLE_REGS_USER = 1U << 12,
112 PERF_SAMPLE_STACK_USER = 1U << 13,
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700114 PERF_SAMPLE_WEIGHT = 1U << 14,
Ben Cheng655a7c02013-10-16 16:09:24 -0700115 PERF_SAMPLE_DATA_SRC = 1U << 15,
Christopher Ferris38062f92014-07-09 15:33:25 -0700116 PERF_SAMPLE_IDENTIFIER = 1U << 16,
117 PERF_SAMPLE_TRANSACTION = 1U << 17,
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 PERF_SAMPLE_MAX = 1U << 18,
Ben Cheng655a7c02013-10-16 16:09:24 -0700120};
121enum perf_branch_sample_type {
Ben Cheng655a7c02013-10-16 16:09:24 -0700122 PERF_SAMPLE_BRANCH_USER = 1U << 0,
Christopher Ferris38062f92014-07-09 15:33:25 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700124 PERF_SAMPLE_BRANCH_KERNEL = 1U << 1,
125 PERF_SAMPLE_BRANCH_HV = 1U << 2,
126 PERF_SAMPLE_BRANCH_ANY = 1U << 3,
Ben Cheng655a7c02013-10-16 16:09:24 -0700127 PERF_SAMPLE_BRANCH_ANY_CALL = 1U << 4,
Christopher Ferris38062f92014-07-09 15:33:25 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700129 PERF_SAMPLE_BRANCH_ANY_RETURN = 1U << 5,
130 PERF_SAMPLE_BRANCH_IND_CALL = 1U << 6,
Christopher Ferris38062f92014-07-09 15:33:25 -0700131 PERF_SAMPLE_BRANCH_ABORT_TX = 1U << 7,
132 PERF_SAMPLE_BRANCH_IN_TX = 1U << 8,
Ben Cheng655a7c02013-10-16 16:09:24 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700134 PERF_SAMPLE_BRANCH_NO_TX = 1U << 9,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700135 PERF_SAMPLE_BRANCH_COND = 1U << 10,
136 PERF_SAMPLE_BRANCH_MAX = 1U << 11,
Ben Cheng655a7c02013-10-16 16:09:24 -0700137};
Christopher Ferris38062f92014-07-09 15:33:25 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700139#define PERF_SAMPLE_BRANCH_PLM_ALL (PERF_SAMPLE_BRANCH_USER| PERF_SAMPLE_BRANCH_KERNEL| PERF_SAMPLE_BRANCH_HV)
Ben Cheng655a7c02013-10-16 16:09:24 -0700140enum perf_sample_regs_abi {
141 PERF_SAMPLE_REGS_ABI_NONE = 0,
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800142 PERF_SAMPLE_REGS_ABI_32 = 1,
Christopher Ferris38062f92014-07-09 15:33:25 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700144 PERF_SAMPLE_REGS_ABI_64 = 2,
Christopher Ferris38062f92014-07-09 15:33:25 -0700145};
146enum {
147 PERF_TXN_ELISION = (1 << 0),
Christopher Ferris38062f92014-07-09 15:33:25 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700149 PERF_TXN_TRANSACTION = (1 << 1),
Christopher Ferris38062f92014-07-09 15:33:25 -0700150 PERF_TXN_SYNC = (1 << 2),
151 PERF_TXN_ASYNC = (1 << 3),
152 PERF_TXN_RETRY = (1 << 4),
Christopher Ferris38062f92014-07-09 15:33:25 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700154 PERF_TXN_CONFLICT = (1 << 5),
Christopher Ferris38062f92014-07-09 15:33:25 -0700155 PERF_TXN_CAPACITY_WRITE = (1 << 6),
156 PERF_TXN_CAPACITY_READ = (1 << 7),
157 PERF_TXN_MAX = (1 << 8),
Christopher Ferris38062f92014-07-09 15:33:25 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700159 PERF_TXN_ABORT_MASK = (0xffffffffULL << 32),
Christopher Ferris38062f92014-07-09 15:33:25 -0700160 PERF_TXN_ABORT_SHIFT = 32,
Ben Cheng655a7c02013-10-16 16:09:24 -0700161};
162enum perf_event_read_format {
Christopher Ferris38062f92014-07-09 15:33:25 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700164 PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0,
Ben Cheng655a7c02013-10-16 16:09:24 -0700165 PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1,
166 PERF_FORMAT_ID = 1U << 2,
167 PERF_FORMAT_GROUP = 1U << 3,
Christopher Ferris38062f92014-07-09 15:33:25 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700169 PERF_FORMAT_MAX = 1U << 4,
Ben Cheng655a7c02013-10-16 16:09:24 -0700170};
171#define PERF_ATTR_SIZE_VER0 64
172#define PERF_ATTR_SIZE_VER1 72
Christopher Ferris38062f92014-07-09 15:33:25 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700174#define PERF_ATTR_SIZE_VER2 80
Ben Cheng655a7c02013-10-16 16:09:24 -0700175#define PERF_ATTR_SIZE_VER3 96
176struct perf_event_attr {
177 __u32 type;
Christopher Ferris38062f92014-07-09 15:33:25 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700179 __u32 size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700180 __u64 config;
181 union {
182 __u64 sample_period;
Christopher Ferris38062f92014-07-09 15:33:25 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700184 __u64 sample_freq;
Ben Cheng655a7c02013-10-16 16:09:24 -0700185 };
186 __u64 sample_type;
187 __u64 read_format;
Christopher Ferris38062f92014-07-09 15:33:25 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700189 __u64 disabled : 1,
Ben Cheng655a7c02013-10-16 16:09:24 -0700190 inherit : 1,
191 pinned : 1,
192 exclusive : 1,
Christopher Ferris38062f92014-07-09 15:33:25 -0700193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700194 exclude_user : 1,
Ben Cheng655a7c02013-10-16 16:09:24 -0700195 exclude_kernel : 1,
196 exclude_hv : 1,
197 exclude_idle : 1,
Christopher Ferris38062f92014-07-09 15:33:25 -0700198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700199 mmap : 1,
Ben Cheng655a7c02013-10-16 16:09:24 -0700200 comm : 1,
201 freq : 1,
202 inherit_stat : 1,
Christopher Ferris38062f92014-07-09 15:33:25 -0700203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700204 enable_on_exec : 1,
Ben Cheng655a7c02013-10-16 16:09:24 -0700205 task : 1,
206 watermark : 1,
207 precise_ip : 2,
Christopher Ferris38062f92014-07-09 15:33:25 -0700208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700209 mmap_data : 1,
Ben Cheng655a7c02013-10-16 16:09:24 -0700210 sample_id_all : 1,
211 exclude_host : 1,
212 exclude_guest : 1,
Christopher Ferris38062f92014-07-09 15:33:25 -0700213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700214 exclude_callchain_kernel : 1,
Ben Cheng655a7c02013-10-16 16:09:24 -0700215 exclude_callchain_user : 1,
Christopher Ferris38062f92014-07-09 15:33:25 -0700216 mmap2 : 1,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700217 comm_exec : 1,
Ben Cheng655a7c02013-10-16 16:09:24 -0700218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700219 __reserved_1 : 39;
220 union {
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800221 __u32 wakeup_events;
Ben Cheng655a7c02013-10-16 16:09:24 -0700222 __u32 wakeup_watermark;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700224 };
225 __u32 bp_type;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800226 union {
Ben Cheng655a7c02013-10-16 16:09:24 -0700227 __u64 bp_addr;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700229 __u64 config1;
230 };
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800231 union {
Ben Cheng655a7c02013-10-16 16:09:24 -0700232 __u64 bp_len;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700234 __u64 config2;
235 };
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800236 __u64 branch_sample_type;
Ben Cheng655a7c02013-10-16 16:09:24 -0700237 __u64 sample_regs_user;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700239 __u32 sample_stack_user;
240 __u32 __reserved_2;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800241};
Ben Cheng655a7c02013-10-16 16:09:24 -0700242#define perf_flags(attr) (*(&(attr)->read_format + 1))
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700244#define PERF_EVENT_IOC_ENABLE _IO ('$', 0)
245#define PERF_EVENT_IOC_DISABLE _IO ('$', 1)
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800246#define PERF_EVENT_IOC_REFRESH _IO ('$', 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700247#define PERF_EVENT_IOC_RESET _IO ('$', 3)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700249#define PERF_EVENT_IOC_PERIOD _IOW('$', 4, __u64)
250#define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5)
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800251#define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *)
Christopher Ferris38062f92014-07-09 15:33:25 -0700252#define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700254enum perf_event_ioc_flags {
255 PERF_IOC_FLAG_GROUP = 1U << 0,
Christopher Ferris38062f92014-07-09 15:33:25 -0700256};
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800257struct perf_event_mmap_page {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700259 __u32 version;
260 __u32 compat_version;
Christopher Ferris38062f92014-07-09 15:33:25 -0700261 __u32 lock;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800262 __u32 index;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700264 __s64 offset;
265 __u64 time_enabled;
Christopher Ferris38062f92014-07-09 15:33:25 -0700266 __u64 time_running;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800267 union {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700269 __u64 capabilities;
Christopher Ferris38062f92014-07-09 15:33:25 -0700270 struct {
Christopher Ferris38062f92014-07-09 15:33:25 -0700271 __u64 cap_bit0 : 1,
272 cap_bit0_is_deprecated : 1,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700274 cap_user_rdpmc : 1,
275 cap_user_time : 1,
Christopher Ferris38062f92014-07-09 15:33:25 -0700276 cap_user_time_zero : 1,
277 cap_____res : 59;
Christopher Ferris38062f92014-07-09 15:33:25 -0700278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700279 };
280 };
Ben Cheng655a7c02013-10-16 16:09:24 -0700281 __u16 pmc_width;
282 __u16 time_shift;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800284 __u32 time_mult;
Ben Cheng655a7c02013-10-16 16:09:24 -0700285 __u64 time_offset;
Christopher Ferris38062f92014-07-09 15:33:25 -0700286 __u64 time_zero;
287 __u32 size;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700289 __u8 __reserved[118*8+4];
Ben Cheng655a7c02013-10-16 16:09:24 -0700290 __u64 data_head;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800291 __u64 data_tail;
Ben Cheng655a7c02013-10-16 16:09:24 -0700292};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700294#define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0)
295#define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0)
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800296#define PERF_RECORD_MISC_KERNEL (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700297#define PERF_RECORD_MISC_USER (2 << 0)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700299#define PERF_RECORD_MISC_HYPERVISOR (3 << 0)
300#define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0)
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800301#define PERF_RECORD_MISC_GUEST_USER (5 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700302#define PERF_RECORD_MISC_MMAP_DATA (1 << 13)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304#define PERF_RECORD_MISC_COMM_EXEC (1 << 13)
Ben Cheng655a7c02013-10-16 16:09:24 -0700305#define PERF_RECORD_MISC_EXACT_IP (1 << 14)
306#define PERF_RECORD_MISC_EXT_RESERVED (1 << 15)
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800307struct perf_event_header {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700309 __u32 type;
310 __u16 misc;
311 __u16 size;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800312};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700314enum perf_event_type {
315 PERF_RECORD_MMAP = 1,
316 PERF_RECORD_LOST = 2,
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800317 PERF_RECORD_COMM = 3,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700319 PERF_RECORD_EXIT = 4,
320 PERF_RECORD_THROTTLE = 5,
321 PERF_RECORD_UNTHROTTLE = 6,
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800322 PERF_RECORD_FORK = 7,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700324 PERF_RECORD_READ = 8,
325 PERF_RECORD_SAMPLE = 9,
Christopher Ferris38062f92014-07-09 15:33:25 -0700326 PERF_RECORD_MMAP2 = 10,
Christopher Ferris38062f92014-07-09 15:33:25 -0700327 PERF_RECORD_MAX,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800329};
Ben Cheng655a7c02013-10-16 16:09:24 -0700330#define PERF_MAX_STACK_DEPTH 127
331enum perf_callchain_context {
Christopher Ferris38062f92014-07-09 15:33:25 -0700332 PERF_CONTEXT_HV = (__u64)-32,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800334 PERF_CONTEXT_KERNEL = (__u64)-128,
Ben Cheng655a7c02013-10-16 16:09:24 -0700335 PERF_CONTEXT_USER = (__u64)-512,
336 PERF_CONTEXT_GUEST = (__u64)-2048,
Christopher Ferris38062f92014-07-09 15:33:25 -0700337 PERF_CONTEXT_GUEST_KERNEL = (__u64)-2176,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800339 PERF_CONTEXT_GUEST_USER = (__u64)-2560,
Ben Cheng655a7c02013-10-16 16:09:24 -0700340 PERF_CONTEXT_MAX = (__u64)-4095,
341};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700342#define PERF_FLAG_FD_NO_GROUP (1UL << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700343/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700344#define PERF_FLAG_FD_OUTPUT (1UL << 1)
345#define PERF_FLAG_PID_CGROUP (1UL << 2)
346#define PERF_FLAG_FD_CLOEXEC (1UL << 3)
Ben Cheng655a7c02013-10-16 16:09:24 -0700347union perf_mem_data_src {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700348/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700349 __u64 val;
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800350 struct {
Ben Cheng655a7c02013-10-16 16:09:24 -0700351 __u64 mem_op:5,
352 mem_lvl:14,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700353/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700354 mem_snoop:5,
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800355 mem_lock:2,
Ben Cheng655a7c02013-10-16 16:09:24 -0700356 mem_dtlb:7,
357 mem_rsvd:31;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700358/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700359 };
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800360};
Ben Cheng655a7c02013-10-16 16:09:24 -0700361#define PERF_MEM_OP_NA 0x01
362#define PERF_MEM_OP_LOAD 0x02
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700363/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700364#define PERF_MEM_OP_STORE 0x04
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800365#define PERF_MEM_OP_PFETCH 0x08
Ben Cheng655a7c02013-10-16 16:09:24 -0700366#define PERF_MEM_OP_EXEC 0x10
367#define PERF_MEM_OP_SHIFT 0
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700368/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700369#define PERF_MEM_LVL_NA 0x01
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800370#define PERF_MEM_LVL_HIT 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -0700371#define PERF_MEM_LVL_MISS 0x04
372#define PERF_MEM_LVL_L1 0x08
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700373/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700374#define PERF_MEM_LVL_LFB 0x10
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800375#define PERF_MEM_LVL_L2 0x20
Ben Cheng655a7c02013-10-16 16:09:24 -0700376#define PERF_MEM_LVL_L3 0x40
377#define PERF_MEM_LVL_LOC_RAM 0x80
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700378/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700379#define PERF_MEM_LVL_REM_RAM1 0x100
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800380#define PERF_MEM_LVL_REM_RAM2 0x200
Ben Cheng655a7c02013-10-16 16:09:24 -0700381#define PERF_MEM_LVL_REM_CCE1 0x400
382#define PERF_MEM_LVL_REM_CCE2 0x800
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700383/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700384#define PERF_MEM_LVL_IO 0x1000
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800385#define PERF_MEM_LVL_UNC 0x2000
Ben Cheng655a7c02013-10-16 16:09:24 -0700386#define PERF_MEM_LVL_SHIFT 5
387#define PERF_MEM_SNOOP_NA 0x01
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700388/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700389#define PERF_MEM_SNOOP_NONE 0x02
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800390#define PERF_MEM_SNOOP_HIT 0x04
Ben Cheng655a7c02013-10-16 16:09:24 -0700391#define PERF_MEM_SNOOP_MISS 0x08
392#define PERF_MEM_SNOOP_HITM 0x10
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700393/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700394#define PERF_MEM_SNOOP_SHIFT 19
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800395#define PERF_MEM_LOCK_NA 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -0700396#define PERF_MEM_LOCK_LOCKED 0x02
397#define PERF_MEM_LOCK_SHIFT 24
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700398/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700399#define PERF_MEM_TLB_NA 0x01
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800400#define PERF_MEM_TLB_HIT 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -0700401#define PERF_MEM_TLB_MISS 0x04
402#define PERF_MEM_TLB_L1 0x08
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700403/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700404#define PERF_MEM_TLB_L2 0x10
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800405#define PERF_MEM_TLB_WK 0x20
Ben Cheng655a7c02013-10-16 16:09:24 -0700406#define PERF_MEM_TLB_OS 0x40
Christopher Ferris38062f92014-07-09 15:33:25 -0700407#define PERF_MEM_TLB_SHIFT 26
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700408/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700409#define PERF_MEM_S(a, s) (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT)
410struct perf_branch_entry {
411 __u64 from;
Christopher Ferris38062f92014-07-09 15:33:25 -0700412 __u64 to;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700413/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700414 __u64 mispred:1,
415 predicted:1,
416 in_tx:1,
Christopher Ferris38062f92014-07-09 15:33:25 -0700417 abort:1,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700418/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700419 reserved:60;
420};
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800421#endif