aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-01-27 02:39:39 -0500
committerIngo Molnar <mingo@elte.hu>2010-01-29 03:01:44 -0500
commit184f412c3341cd24fbd26604634a5800b83dbdc3 (patch)
treec6e927f54a396d6affa56e84695d24ef01d107ad /include/linux/perf_event.h
parent6c9687abeb24d5b7aae7db5be070c2139ad29e29 (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.h24
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;
752extern const struct pmu *hw_perf_event_init(struct perf_event *event); 752extern const struct pmu *hw_perf_event_init(struct perf_event *event);
753 753
754extern void perf_event_task_sched_in(struct task_struct *task); 754extern void perf_event_task_sched_in(struct task_struct *task);
755extern void perf_event_task_sched_out(struct task_struct *task, 755extern void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next);
756 struct task_struct *next);
757extern void perf_event_task_tick(struct task_struct *task); 756extern void perf_event_task_tick(struct task_struct *task);
758extern int perf_event_init_task(struct task_struct *child); 757extern int perf_event_init_task(struct task_struct *child);
759extern void perf_event_exit_task(struct task_struct *child); 758extern void perf_event_exit_task(struct task_struct *child);
@@ -853,8 +852,7 @@ extern int sysctl_perf_event_mlock;
853extern int sysctl_perf_event_sample_rate; 852extern int sysctl_perf_event_sample_rate;
854 853
855extern void perf_event_init(void); 854extern void perf_event_init(void);
856extern void perf_tp_event(int event_id, u64 addr, u64 count, 855extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size);
857 void *record, int entry_size);
858extern void perf_bp_event(struct perf_event *event, void *data); 856extern 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
895perf_sw_event(u32 event_id, u64 nr, int nmi, 893perf_sw_event(u32 event_id, u64 nr, int nmi,
896 struct pt_regs *regs, u64 addr) { } 894 struct pt_regs *regs, u64 addr) { }
897static inline void 895static inline void
898perf_bp_event(struct perf_event *event, void *data) { } 896perf_bp_event(struct perf_event *event, void *data) { }
899 897
900static inline void perf_event_mmap(struct vm_area_struct *vma) { } 898static inline void perf_event_mmap(struct vm_area_struct *vma) { }
901static inline void perf_event_comm(struct task_struct *tsk) { } 899static inline void perf_event_comm(struct task_struct *tsk) { }
902static inline void perf_event_fork(struct task_struct *tsk) { } 900static inline void perf_event_fork(struct task_struct *tsk) { }
903static inline void perf_event_init(void) { } 901static inline void perf_event_init(void) { }
904static inline int perf_swevent_get_recursion_context(void) { return -1; } 902static inline int perf_swevent_get_recursion_context(void) { return -1; }
905static inline void perf_swevent_put_recursion_context(int rctx) { } 903static inline void perf_swevent_put_recursion_context(int rctx) { }
906static inline void perf_event_enable(struct perf_event *event) { } 904static inline void perf_event_enable(struct perf_event *event) { }
907static inline void perf_event_disable(struct perf_event *event) { } 905static inline void perf_event_disable(struct perf_event *event) { }