diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-01-27 02:39:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-01-29 03:01:44 -0500 |
commit | 184f412c3341cd24fbd26604634a5800b83dbdc3 (patch) | |
tree | c6e927f54a396d6affa56e84695d24ef01d107ad /include/linux/perf_event.h | |
parent | 6c9687abeb24d5b7aae7db5be070c2139ad29e29 (diff) |
perf, x86: Clean up event constraints code a bit
- Remove stray debug code
- Improve ugly macros a bit
- Remove some whitespace damage
- (Also fix up some accumulated damage in perf_event.h)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 72b2615600d8..953c17731e0d 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -290,7 +290,7 @@ struct perf_event_mmap_page { | |||
290 | }; | 290 | }; |
291 | 291 | ||
292 | #define PERF_RECORD_MISC_CPUMODE_MASK (3 << 0) | 292 | #define PERF_RECORD_MISC_CPUMODE_MASK (3 << 0) |
293 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) | 293 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) |
294 | #define PERF_RECORD_MISC_KERNEL (1 << 0) | 294 | #define PERF_RECORD_MISC_KERNEL (1 << 0) |
295 | #define PERF_RECORD_MISC_USER (2 << 0) | 295 | #define PERF_RECORD_MISC_USER (2 << 0) |
296 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) | 296 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) |
@@ -356,8 +356,8 @@ enum perf_event_type { | |||
356 | * u64 stream_id; | 356 | * u64 stream_id; |
357 | * }; | 357 | * }; |
358 | */ | 358 | */ |
359 | PERF_RECORD_THROTTLE = 5, | 359 | PERF_RECORD_THROTTLE = 5, |
360 | PERF_RECORD_UNTHROTTLE = 6, | 360 | PERF_RECORD_UNTHROTTLE = 6, |
361 | 361 | ||
362 | /* | 362 | /* |
363 | * struct { | 363 | * struct { |
@@ -371,10 +371,10 @@ enum perf_event_type { | |||
371 | 371 | ||
372 | /* | 372 | /* |
373 | * struct { | 373 | * struct { |
374 | * struct perf_event_header header; | 374 | * struct perf_event_header header; |
375 | * u32 pid, tid; | 375 | * u32 pid, tid; |
376 | * | 376 | * |
377 | * struct read_format values; | 377 | * struct read_format values; |
378 | * }; | 378 | * }; |
379 | */ | 379 | */ |
380 | PERF_RECORD_READ = 8, | 380 | PERF_RECORD_READ = 8, |
@@ -412,7 +412,7 @@ enum perf_event_type { | |||
412 | * char data[size];}&& PERF_SAMPLE_RAW | 412 | * char data[size];}&& PERF_SAMPLE_RAW |
413 | * }; | 413 | * }; |
414 | */ | 414 | */ |
415 | PERF_RECORD_SAMPLE = 9, | 415 | PERF_RECORD_SAMPLE = 9, |
416 | 416 | ||
417 | PERF_RECORD_MAX, /* non-ABI */ | 417 | PERF_RECORD_MAX, /* non-ABI */ |
418 | }; | 418 | }; |
@@ -752,8 +752,7 @@ extern int perf_max_events; | |||
752 | extern const struct pmu *hw_perf_event_init(struct perf_event *event); | 752 | extern const struct pmu *hw_perf_event_init(struct perf_event *event); |
753 | 753 | ||
754 | extern void perf_event_task_sched_in(struct task_struct *task); | 754 | extern void perf_event_task_sched_in(struct task_struct *task); |
755 | extern void perf_event_task_sched_out(struct task_struct *task, | 755 | extern void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next); |
756 | struct task_struct *next); | ||
757 | extern void perf_event_task_tick(struct task_struct *task); | 756 | extern void perf_event_task_tick(struct task_struct *task); |
758 | extern int perf_event_init_task(struct task_struct *child); | 757 | extern int perf_event_init_task(struct task_struct *child); |
759 | extern void perf_event_exit_task(struct task_struct *child); | 758 | extern void perf_event_exit_task(struct task_struct *child); |
@@ -853,8 +852,7 @@ extern int sysctl_perf_event_mlock; | |||
853 | extern int sysctl_perf_event_sample_rate; | 852 | extern int sysctl_perf_event_sample_rate; |
854 | 853 | ||
855 | extern void perf_event_init(void); | 854 | extern void perf_event_init(void); |
856 | extern void perf_tp_event(int event_id, u64 addr, u64 count, | 855 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); |
857 | void *record, int entry_size); | ||
858 | extern void perf_bp_event(struct perf_event *event, void *data); | 856 | extern void perf_bp_event(struct perf_event *event, void *data); |
859 | 857 | ||
860 | #ifndef perf_misc_flags | 858 | #ifndef perf_misc_flags |
@@ -895,13 +893,13 @@ static inline void | |||
895 | perf_sw_event(u32 event_id, u64 nr, int nmi, | 893 | perf_sw_event(u32 event_id, u64 nr, int nmi, |
896 | struct pt_regs *regs, u64 addr) { } | 894 | struct pt_regs *regs, u64 addr) { } |
897 | static inline void | 895 | static inline void |
898 | perf_bp_event(struct perf_event *event, void *data) { } | 896 | perf_bp_event(struct perf_event *event, void *data) { } |
899 | 897 | ||
900 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 898 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
901 | static inline void perf_event_comm(struct task_struct *tsk) { } | 899 | static inline void perf_event_comm(struct task_struct *tsk) { } |
902 | static inline void perf_event_fork(struct task_struct *tsk) { } | 900 | static inline void perf_event_fork(struct task_struct *tsk) { } |
903 | static inline void perf_event_init(void) { } | 901 | static inline void perf_event_init(void) { } |
904 | static inline int perf_swevent_get_recursion_context(void) { return -1; } | 902 | static inline int perf_swevent_get_recursion_context(void) { return -1; } |
905 | static inline void perf_swevent_put_recursion_context(int rctx) { } | 903 | static inline void perf_swevent_put_recursion_context(int rctx) { } |
906 | static inline void perf_event_enable(struct perf_event *event) { } | 904 | static inline void perf_event_enable(struct perf_event *event) { } |
907 | static inline void perf_event_disable(struct perf_event *event) { } | 905 | static inline void perf_event_disable(struct perf_event *event) { } |