aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_counter.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r--include/linux/perf_counter.h28
1 files changed, 10 insertions, 18 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 5bd8817b12d4..4809ae18a940 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -201,8 +201,9 @@ struct perf_counter_mmap_page {
201 __u32 data_head; /* head in the data section */ 201 __u32 data_head; /* head in the data section */
202}; 202};
203 203
204#define PERF_EVENT_MISC_KERNEL (1 << 0) 204#define PERF_EVENT_MISC_KERNEL (1 << 0)
205#define PERF_EVENT_MISC_USER (1 << 1) 205#define PERF_EVENT_MISC_USER (1 << 1)
206#define PERF_EVENT_MISC_OVERFLOW (1 << 2)
206 207
207struct perf_event_header { 208struct perf_event_header {
208 __u32 type; 209 __u32 type;
@@ -230,36 +231,27 @@ enum perf_event_type {
230 PERF_EVENT_MUNMAP = 2, 231 PERF_EVENT_MUNMAP = 2,
231 232
232 /* 233 /*
233 * Half the event type space is reserved for the counter overflow 234 * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field
234 * bitfields, as found in hw_event.record_type. 235 * will be PERF_RECORD_*
235 *
236 * These events will have types of the form:
237 * PERF_EVENT_COUNTER_OVERFLOW { | __PERF_EVENT_* } *
238 * 236 *
239 * struct { 237 * struct {
240 * struct perf_event_header header; 238 * struct perf_event_header header;
241 * 239 *
242 * { u64 ip; } && __PERF_EVENT_IP 240 * { u64 ip; } && PERF_RECORD_IP
243 * { u32 pid, tid; } && __PERF_EVENT_TID 241 * { u32 pid, tid; } && PERF_RECORD_TID
244 * 242 *
245 * { u64 nr; 243 * { u64 nr;
246 * { u64 event, val; } cnt[nr]; } && __PERF_EVENT_GROUP 244 * { u64 event, val; } cnt[nr]; } && PERF_RECORD_GROUP
247 * 245 *
248 * { u16 nr, 246 * { u16 nr,
249 * hv, 247 * hv,
250 * kernel, 248 * kernel,
251 * user; 249 * user;
252 * u64 ips[nr]; } && __PERF_EVENT_CALLCHAIN 250 * u64 ips[nr]; } && PERF_RECORD_CALLCHAIN
253 * 251 *
254 * { u64 time; } && __PERF_EVENT_TIME 252 * { u64 time; } && PERF_RECORD_TIME
255 * }; 253 * };
256 */ 254 */
257 PERF_EVENT_COUNTER_OVERFLOW = 1UL << 31,
258 __PERF_EVENT_IP = PERF_RECORD_IP,
259 __PERF_EVENT_TID = PERF_RECORD_TID,
260 __PERF_EVENT_GROUP = PERF_RECORD_GROUP,
261 __PERF_EVENT_CALLCHAIN = PERF_RECORD_CALLCHAIN,
262 __PERF_EVENT_TIME = PERF_RECORD_TIME,
263}; 255};
264 256
265#ifdef __KERNEL__ 257#ifdef __KERNEL__