diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-21 06:20:38 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-21 08:34:11 -0400 |
commit | 57c0c15b5244320065374ad2c54f4fbec77a6428 (patch) | |
tree | 35369d817f5925aca09b083bba47c437b91386d9 /include/linux/perf_event.h | |
parent | cdd6c482c9ff9c55475ee7392ec8f672eddb7be6 (diff) |
perf: Tidy up after the big rename
- provide compatibility Kconfig entry for existing PERF_COUNTERS .config's
- provide courtesy copy of old perf_counter.h, for user-space projects
- small indentation fixups
- fix up MAINTAINERS
- fix small x86 printout fallout
- fix up small PowerPC comment fallout (use 'counter' as in register)
Reviewed-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index ae9d9ed6df2a..acefaf71e6dd 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -1,15 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * Performance events: | 2 | * Performance events: |
3 | * | 3 | * |
4 | * Copyright (C) 2008-2009, Thomas Gleixner <tglx@linutronix.de> | 4 | * Copyright (C) 2008-2009, Thomas Gleixner <tglx@linutronix.de> |
5 | * Copyright (C) 2008-2009, Red Hat, Inc., Ingo Molnar | 5 | * Copyright (C) 2008-2009, Red Hat, Inc., Ingo Molnar |
6 | * Copyright (C) 2008-2009, Red Hat, Inc., Peter Zijlstra | 6 | * Copyright (C) 2008-2009, Red Hat, Inc., Peter Zijlstra |
7 | * | 7 | * |
8 | * Data type definitions, declarations, prototypes. | 8 | * Data type definitions, declarations, prototypes. |
9 | * | 9 | * |
10 | * Started by: Thomas Gleixner and Ingo Molnar | 10 | * Started by: Thomas Gleixner and Ingo Molnar |
11 | * | 11 | * |
12 | * For licencing details see kernel-base/COPYING | 12 | * For licencing details see kernel-base/COPYING |
13 | */ | 13 | */ |
14 | #ifndef _LINUX_PERF_EVENT_H | 14 | #ifndef _LINUX_PERF_EVENT_H |
15 | #define _LINUX_PERF_EVENT_H | 15 | #define _LINUX_PERF_EVENT_H |
@@ -131,19 +131,19 @@ enum perf_event_sample_format { | |||
131 | * as specified by attr.read_format: | 131 | * as specified by attr.read_format: |
132 | * | 132 | * |
133 | * struct read_format { | 133 | * struct read_format { |
134 | * { u64 value; | 134 | * { u64 value; |
135 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED | 135 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED |
136 | * { u64 time_running; } && PERF_FORMAT_RUNNING | 136 | * { u64 time_running; } && PERF_FORMAT_RUNNING |
137 | * { u64 id; } && PERF_FORMAT_ID | 137 | * { u64 id; } && PERF_FORMAT_ID |
138 | * } && !PERF_FORMAT_GROUP | 138 | * } && !PERF_FORMAT_GROUP |
139 | * | 139 | * |
140 | * { u64 nr; | 140 | * { u64 nr; |
141 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED | 141 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED |
142 | * { u64 time_running; } && PERF_FORMAT_RUNNING | 142 | * { u64 time_running; } && PERF_FORMAT_RUNNING |
143 | * { u64 value; | 143 | * { u64 value; |
144 | * { u64 id; } && PERF_FORMAT_ID | 144 | * { u64 id; } && PERF_FORMAT_ID |
145 | * } cntr[nr]; | 145 | * } cntr[nr]; |
146 | * } && PERF_FORMAT_GROUP | 146 | * } && PERF_FORMAT_GROUP |
147 | * }; | 147 | * }; |
148 | */ | 148 | */ |
149 | enum perf_event_read_format { | 149 | enum perf_event_read_format { |
@@ -152,7 +152,7 @@ enum perf_event_read_format { | |||
152 | PERF_FORMAT_ID = 1U << 2, | 152 | PERF_FORMAT_ID = 1U << 2, |
153 | PERF_FORMAT_GROUP = 1U << 3, | 153 | PERF_FORMAT_GROUP = 1U << 3, |
154 | 154 | ||
155 | PERF_FORMAT_MAX = 1U << 4, /* non-ABI */ | 155 | PERF_FORMAT_MAX = 1U << 4, /* non-ABI */ |
156 | }; | 156 | }; |
157 | 157 | ||
158 | #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ | 158 | #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ |
@@ -216,8 +216,8 @@ struct perf_event_attr { | |||
216 | * Ioctls that can be done on a perf event fd: | 216 | * Ioctls that can be done on a perf event fd: |
217 | */ | 217 | */ |
218 | #define PERF_EVENT_IOC_ENABLE _IO ('$', 0) | 218 | #define PERF_EVENT_IOC_ENABLE _IO ('$', 0) |
219 | #define PERF_EVENT_IOC_DISABLE _IO ('$', 1) | 219 | #define PERF_EVENT_IOC_DISABLE _IO ('$', 1) |
220 | #define PERF_EVENT_IOC_REFRESH _IO ('$', 2) | 220 | #define PERF_EVENT_IOC_REFRESH _IO ('$', 2) |
221 | #define PERF_EVENT_IOC_RESET _IO ('$', 3) | 221 | #define PERF_EVENT_IOC_RESET _IO ('$', 3) |
222 | #define PERF_EVENT_IOC_PERIOD _IOW('$', 4, u64) | 222 | #define PERF_EVENT_IOC_PERIOD _IOW('$', 4, u64) |
223 | #define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) | 223 | #define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) |
@@ -314,9 +314,9 @@ enum perf_event_type { | |||
314 | 314 | ||
315 | /* | 315 | /* |
316 | * struct { | 316 | * struct { |
317 | * struct perf_event_header header; | 317 | * struct perf_event_header header; |
318 | * u64 id; | 318 | * u64 id; |
319 | * u64 lost; | 319 | * u64 lost; |
320 | * }; | 320 | * }; |
321 | */ | 321 | */ |
322 | PERF_RECORD_LOST = 2, | 322 | PERF_RECORD_LOST = 2, |
@@ -383,23 +383,23 @@ enum perf_event_type { | |||
383 | * { u64 id; } && PERF_SAMPLE_ID | 383 | * { u64 id; } && PERF_SAMPLE_ID |
384 | * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID | 384 | * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID |
385 | * { u32 cpu, res; } && PERF_SAMPLE_CPU | 385 | * { u32 cpu, res; } && PERF_SAMPLE_CPU |
386 | * { u64 period; } && PERF_SAMPLE_PERIOD | 386 | * { u64 period; } && PERF_SAMPLE_PERIOD |
387 | * | 387 | * |
388 | * { struct read_format values; } && PERF_SAMPLE_READ | 388 | * { struct read_format values; } && PERF_SAMPLE_READ |
389 | * | 389 | * |
390 | * { u64 nr, | 390 | * { u64 nr, |
391 | * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN | 391 | * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN |
392 | * | 392 | * |
393 | * # | 393 | * # |
394 | * # The RAW record below is opaque data wrt the ABI | 394 | * # The RAW record below is opaque data wrt the ABI |
395 | * # | 395 | * # |
396 | * # That is, the ABI doesn't make any promises wrt to | 396 | * # That is, the ABI doesn't make any promises wrt to |
397 | * # the stability of its content, it may vary depending | 397 | * # the stability of its content, it may vary depending |
398 | * # on event_id, hardware, kernel version and phase of | 398 | * # on event, hardware, kernel version and phase of |
399 | * # the moon. | 399 | * # the moon. |
400 | * # | 400 | * # |
401 | * # In other words, PERF_SAMPLE_RAW contents are not an ABI. | 401 | * # In other words, PERF_SAMPLE_RAW contents are not an ABI. |
402 | * # | 402 | * # |
403 | * | 403 | * |
404 | * { u32 size; | 404 | * { u32 size; |
405 | * char data[size];}&& PERF_SAMPLE_RAW | 405 | * char data[size];}&& PERF_SAMPLE_RAW |
@@ -503,10 +503,10 @@ struct pmu { | |||
503 | * enum perf_event_active_state - the states of a event | 503 | * enum perf_event_active_state - the states of a event |
504 | */ | 504 | */ |
505 | enum perf_event_active_state { | 505 | enum perf_event_active_state { |
506 | PERF_EVENT_STATE_ERROR = -2, | 506 | PERF_EVENT_STATE_ERROR = -2, |
507 | PERF_EVENT_STATE_OFF = -1, | 507 | PERF_EVENT_STATE_OFF = -1, |
508 | PERF_EVENT_STATE_INACTIVE = 0, | 508 | PERF_EVENT_STATE_INACTIVE = 0, |
509 | PERF_EVENT_STATE_ACTIVE = 1, | 509 | PERF_EVENT_STATE_ACTIVE = 1, |
510 | }; | 510 | }; |
511 | 511 | ||
512 | struct file; | 512 | struct file; |
@@ -529,7 +529,7 @@ struct perf_mmap_data { | |||
529 | 529 | ||
530 | long watermark; /* wakeup watermark */ | 530 | long watermark; /* wakeup watermark */ |
531 | 531 | ||
532 | struct perf_event_mmap_page *user_page; | 532 | struct perf_event_mmap_page *user_page; |
533 | void *data_pages[0]; | 533 | void *data_pages[0]; |
534 | }; | 534 | }; |
535 | 535 | ||
@@ -694,14 +694,14 @@ struct perf_cpu_context { | |||
694 | }; | 694 | }; |
695 | 695 | ||
696 | struct perf_output_handle { | 696 | struct perf_output_handle { |
697 | struct perf_event *event; | 697 | struct perf_event *event; |
698 | struct perf_mmap_data *data; | 698 | struct perf_mmap_data *data; |
699 | unsigned long head; | 699 | unsigned long head; |
700 | unsigned long offset; | 700 | unsigned long offset; |
701 | int nmi; | 701 | int nmi; |
702 | int sample; | 702 | int sample; |
703 | int locked; | 703 | int locked; |
704 | unsigned long flags; | 704 | unsigned long flags; |
705 | }; | 705 | }; |
706 | 706 | ||
707 | #ifdef CONFIG_PERF_EVENTS | 707 | #ifdef CONFIG_PERF_EVENTS |
@@ -829,22 +829,22 @@ static inline void | |||
829 | perf_event_task_sched_out(struct task_struct *task, | 829 | perf_event_task_sched_out(struct task_struct *task, |
830 | struct task_struct *next, int cpu) { } | 830 | struct task_struct *next, int cpu) { } |
831 | static inline void | 831 | static inline void |
832 | perf_event_task_tick(struct task_struct *task, int cpu) { } | 832 | perf_event_task_tick(struct task_struct *task, int cpu) { } |
833 | static inline int perf_event_init_task(struct task_struct *child) { return 0; } | 833 | static inline int perf_event_init_task(struct task_struct *child) { return 0; } |
834 | static inline void perf_event_exit_task(struct task_struct *child) { } | 834 | static inline void perf_event_exit_task(struct task_struct *child) { } |
835 | static inline void perf_event_free_task(struct task_struct *task) { } | 835 | static inline void perf_event_free_task(struct task_struct *task) { } |
836 | static inline void perf_event_do_pending(void) { } | 836 | static inline void perf_event_do_pending(void) { } |
837 | static inline void perf_event_print_debug(void) { } | 837 | static inline void perf_event_print_debug(void) { } |
838 | static inline void perf_disable(void) { } | 838 | static inline void perf_disable(void) { } |
839 | static inline void perf_enable(void) { } | 839 | static inline void perf_enable(void) { } |
840 | static inline int perf_event_task_disable(void) { return -EINVAL; } | 840 | static inline int perf_event_task_disable(void) { return -EINVAL; } |
841 | static inline int perf_event_task_enable(void) { return -EINVAL; } | 841 | static inline int perf_event_task_enable(void) { return -EINVAL; } |
842 | 842 | ||
843 | static inline void | 843 | static inline void |
844 | perf_sw_event(u32 event_id, u64 nr, int nmi, | 844 | perf_sw_event(u32 event_id, u64 nr, int nmi, |
845 | struct pt_regs *regs, u64 addr) { } | 845 | struct pt_regs *regs, u64 addr) { } |
846 | 846 | ||
847 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 847 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
848 | static inline void perf_event_comm(struct task_struct *tsk) { } | 848 | static inline void perf_event_comm(struct task_struct *tsk) { } |
849 | static inline void perf_event_fork(struct task_struct *tsk) { } | 849 | static inline void perf_event_fork(struct task_struct *tsk) { } |
850 | static inline void perf_event_init(void) { } | 850 | static inline void perf_event_init(void) { } |