1/****************************************************************************
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 __PERF_RECORD_H
20#define __PERF_RECORD_H
21/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
22struct mmap_event {
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24  struct perf_event_header header;
25  u32 pid, tid;
26  u64 start;
27  u64 len;
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29  u64 pgoff;
30  char filename[PATH_MAX];
31};
32struct mmap2_event {
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34  struct perf_event_header header;
35  u32 pid, tid;
36  u64 start;
37  u64 len;
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  u64 pgoff;
40  u32 maj;
41  u32 min;
42  u64 ino;
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44  u64 ino_generation;
45  char filename[PATH_MAX];
46};
47struct comm_event {
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49  struct perf_event_header header;
50  u32 pid, tid;
51  char comm[16];
52};
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54struct fork_event {
55  struct perf_event_header header;
56  u32 pid, ppid;
57  u32 tid, ptid;
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  u64 time;
60};
61struct lost_event {
62  struct perf_event_header header;
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  u64 id;
65  u64 lost;
66};
67struct read_event {
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  struct perf_event_header header;
70  u32 pid, tid;
71  u64 value;
72  u64 time_enabled;
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  u64 time_running;
75  u64 id;
76};
77#define PERF_SAMPLE_MASK (PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME | PERF_SAMPLE_ADDR | PERF_SAMPLE_ID | PERF_SAMPLE_STREAM_ID | PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD | PERF_SAMPLE_IDENTIFIER)
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79struct sample_event {
80  struct perf_event_header header;
81  u64 array[];
82};
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84struct regs_dump {
85  u64 abi;
86  u64 * regs;
87};
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89struct stack_dump {
90  u16 offset;
91  u64 size;
92  char * data;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94};
95struct sample_read_value {
96  u64 value;
97  u64 id;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99};
100struct sample_read {
101  u64 time_enabled;
102  u64 time_running;
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104  union {
105    struct {
106      u64 nr;
107      struct sample_read_value * values;
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109    } group;
110    struct sample_read_value one;
111  };
112};
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114struct perf_sample {
115  u64 ip;
116  u32 pid, tid;
117  u64 time;
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119  u64 addr;
120  u64 id;
121  u64 stream_id;
122  u64 period;
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124  u64 weight;
125  u32 cpu;
126  u32 raw_size;
127  u64 data_src;
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  void * raw_data;
130  struct ip_callchain * callchain;
131  struct branch_stack * branch_stack;
132  struct regs_dump user_regs;
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134  struct stack_dump user_stack;
135  struct sample_read read;
136};
137#define PERF_MEM_DATA_SRC_NONE (PERF_MEM_S(OP, NA) | PERF_MEM_S(LVL, NA) | PERF_MEM_S(SNOOP, NA) | PERF_MEM_S(LOCK, NA) | PERF_MEM_S(TLB, NA))
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139struct build_id_event {
140  struct perf_event_header header;
141  pid_t pid;
142  u8 build_id[PERF_ALIGN(BUILD_ID_SIZE, sizeof(u64))];
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144  char filename[];
145};
146enum perf_user_event_type {
147  PERF_RECORD_USER_TYPE_START = 64,
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149  PERF_RECORD_HEADER_ATTR = 64,
150  PERF_RECORD_HEADER_EVENT_TYPE = 65,
151  PERF_RECORD_HEADER_TRACING_DATA = 66,
152  PERF_RECORD_HEADER_BUILD_ID = 67,
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154  PERF_RECORD_FINISHED_ROUND = 68,
155  PERF_RECORD_HEADER_MAX
156};
157struct attr_event {
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159  struct perf_event_header header;
160  struct perf_event_attr attr;
161  u64 id[];
162};
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164#define MAX_EVENT_NAME 64
165struct perf_trace_event_type {
166  u64 event_id;
167  char name[MAX_EVENT_NAME];
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169};
170struct event_type_event {
171  struct perf_event_header header;
172  struct perf_trace_event_type event_type;
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174};
175struct tracing_data_event {
176  struct perf_event_header header;
177  u32 size;
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179};
180union perf_event {
181  struct perf_event_header header;
182  struct mmap_event mmap;
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184  struct mmap2_event mmap2;
185  struct comm_event comm;
186  struct fork_event fork;
187  struct lost_event lost;
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189  struct read_event read;
190  struct sample_event sample;
191  struct attr_event attr;
192  struct event_type_event event_type;
193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194  struct tracing_data_event tracing_data;
195  struct build_id_event build_id;
196};
197struct perf_tool;
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199struct thread_map;
200typedef int(* perf_event__handler_t) (struct perf_tool * tool, union perf_event * event, struct perf_sample * sample, struct machine * machine);
201struct addr_location;
202#endif
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204
205