aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_counter.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-08-11 08:19:09 -0400
committerIngo Molnar <mingo@elte.hu>2009-08-11 08:19:09 -0400
commit89034bc2c7b839702c00a704e79d112737f98be0 (patch)
treee65b1f3d4c751baa840efc81bc4734f089379eb3 /include/linux/perf_counter.h
parentfb82ad719831db58e9baa4c67015aae3fe27e7e3 (diff)
parent85dfd81dc57e8183a277ddd7a56aa65c96f3f487 (diff)
Merge branch 'linus' into tracing/core
Conflicts: kernel/trace/trace_events_filter.c We use the tracing/core version. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r--include/linux/perf_counter.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 5e970c7d3fd5..a9d823a93fe8 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -120,8 +120,10 @@ enum perf_counter_sample_format {
120 PERF_SAMPLE_ID = 1U << 6, 120 PERF_SAMPLE_ID = 1U << 6,
121 PERF_SAMPLE_CPU = 1U << 7, 121 PERF_SAMPLE_CPU = 1U << 7,
122 PERF_SAMPLE_PERIOD = 1U << 8, 122 PERF_SAMPLE_PERIOD = 1U << 8,
123 PERF_SAMPLE_STREAM_ID = 1U << 9,
124 PERF_SAMPLE_RAW = 1U << 10,
123 125
124 PERF_SAMPLE_MAX = 1U << 9, /* non-ABI */ 126 PERF_SAMPLE_MAX = 1U << 11, /* non-ABI */
125}; 127};
126 128
127/* 129/*
@@ -180,8 +182,9 @@ struct perf_counter_attr {
180 freq : 1, /* use freq, not period */ 182 freq : 1, /* use freq, not period */
181 inherit_stat : 1, /* per task counts */ 183 inherit_stat : 1, /* per task counts */
182 enable_on_exec : 1, /* next exec enables */ 184 enable_on_exec : 1, /* next exec enables */
185 task : 1, /* trace fork/exit */
183 186
184 __reserved_1 : 51; 187 __reserved_1 : 50;
185 188
186 __u32 wakeup_events; /* wakeup every n events */ 189 __u32 wakeup_events; /* wakeup every n events */
187 __u32 __reserved_2; 190 __u32 __reserved_2;
@@ -310,18 +313,18 @@ enum perf_event_type {
310 /* 313 /*
311 * struct { 314 * struct {
312 * struct perf_event_header header; 315 * struct perf_event_header header;
313 * u64 time; 316 * u32 pid, ppid;
314 * u64 id; 317 * u32 tid, ptid;
315 * u64 sample_period;
316 * }; 318 * };
317 */ 319 */
318 PERF_EVENT_PERIOD = 4, 320 PERF_EVENT_EXIT = 4,
319 321
320 /* 322 /*
321 * struct { 323 * struct {
322 * struct perf_event_header header; 324 * struct perf_event_header header;
323 * u64 time; 325 * u64 time;
324 * u64 id; 326 * u64 id;
327 * u64 stream_id;
325 * }; 328 * };
326 */ 329 */
327 PERF_EVENT_THROTTLE = 5, 330 PERF_EVENT_THROTTLE = 5,
@@ -331,6 +334,7 @@ enum perf_event_type {
331 * struct { 334 * struct {
332 * struct perf_event_header header; 335 * struct perf_event_header header;
333 * u32 pid, ppid; 336 * u32 pid, ppid;
337 * u32 tid, ptid;
334 * }; 338 * };
335 */ 339 */
336 PERF_EVENT_FORK = 7, 340 PERF_EVENT_FORK = 7,
@@ -356,6 +360,7 @@ enum perf_event_type {
356 * { u64 time; } && PERF_SAMPLE_TIME 360 * { u64 time; } && PERF_SAMPLE_TIME
357 * { u64 addr; } && PERF_SAMPLE_ADDR 361 * { u64 addr; } && PERF_SAMPLE_ADDR
358 * { u64 id; } && PERF_SAMPLE_ID 362 * { u64 id; } && PERF_SAMPLE_ID
363 * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID
359 * { u32 cpu, res; } && PERF_SAMPLE_CPU 364 * { u32 cpu, res; } && PERF_SAMPLE_CPU
360 * { u64 period; } && PERF_SAMPLE_PERIOD 365 * { u64 period; } && PERF_SAMPLE_PERIOD
361 * 366 *
@@ -364,6 +369,8 @@ enum perf_event_type {
364 * 369 *
365 * { u64 nr, 370 * { u64 nr,
366 * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN 371 * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN
372 * { u32 size;
373 * char data[size];}&& PERF_SAMPLE_RAW
367 * }; 374 * };
368 */ 375 */
369 PERF_EVENT_SAMPLE = 9, 376 PERF_EVENT_SAMPLE = 9,
@@ -409,6 +416,11 @@ struct perf_callchain_entry {
409 __u64 ip[PERF_MAX_STACK_DEPTH]; 416 __u64 ip[PERF_MAX_STACK_DEPTH];
410}; 417};
411 418
419struct perf_raw_record {
420 u32 size;
421 void *data;
422};
423
412struct task_struct; 424struct task_struct;
413 425
414/** 426/**
@@ -677,6 +689,7 @@ struct perf_sample_data {
677 struct pt_regs *regs; 689 struct pt_regs *regs;
678 u64 addr; 690 u64 addr;
679 u64 period; 691 u64 period;
692 struct perf_raw_record *raw;
680}; 693};
681 694
682extern int perf_counter_overflow(struct perf_counter *counter, int nmi, 695extern int perf_counter_overflow(struct perf_counter *counter, int nmi,