diff options
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 8fa71874113f..7b18b4fd5df7 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -211,11 +211,9 @@ struct perf_event_attr { | |||
211 | __u32 wakeup_watermark; /* bytes before wakeup */ | 211 | __u32 wakeup_watermark; /* bytes before wakeup */ |
212 | }; | 212 | }; |
213 | 213 | ||
214 | __u32 __reserved_2; | ||
215 | |||
216 | __u64 bp_addr; | ||
217 | __u32 bp_type; | 214 | __u32 bp_type; |
218 | __u32 bp_len; | 215 | __u64 bp_addr; |
216 | __u64 bp_len; | ||
219 | }; | 217 | }; |
220 | 218 | ||
221 | /* | 219 | /* |
@@ -290,7 +288,7 @@ struct perf_event_mmap_page { | |||
290 | }; | 288 | }; |
291 | 289 | ||
292 | #define PERF_RECORD_MISC_CPUMODE_MASK (3 << 0) | 290 | #define PERF_RECORD_MISC_CPUMODE_MASK (3 << 0) |
293 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) | 291 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) |
294 | #define PERF_RECORD_MISC_KERNEL (1 << 0) | 292 | #define PERF_RECORD_MISC_KERNEL (1 << 0) |
295 | #define PERF_RECORD_MISC_USER (2 << 0) | 293 | #define PERF_RECORD_MISC_USER (2 << 0) |
296 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) | 294 | #define PERF_RECORD_MISC_HYPERVISOR (3 << 0) |
@@ -356,8 +354,8 @@ enum perf_event_type { | |||
356 | * u64 stream_id; | 354 | * u64 stream_id; |
357 | * }; | 355 | * }; |
358 | */ | 356 | */ |
359 | PERF_RECORD_THROTTLE = 5, | 357 | PERF_RECORD_THROTTLE = 5, |
360 | PERF_RECORD_UNTHROTTLE = 6, | 358 | PERF_RECORD_UNTHROTTLE = 6, |
361 | 359 | ||
362 | /* | 360 | /* |
363 | * struct { | 361 | * struct { |
@@ -371,10 +369,10 @@ enum perf_event_type { | |||
371 | 369 | ||
372 | /* | 370 | /* |
373 | * struct { | 371 | * struct { |
374 | * struct perf_event_header header; | 372 | * struct perf_event_header header; |
375 | * u32 pid, tid; | 373 | * u32 pid, tid; |
376 | * | 374 | * |
377 | * struct read_format values; | 375 | * struct read_format values; |
378 | * }; | 376 | * }; |
379 | */ | 377 | */ |
380 | PERF_RECORD_READ = 8, | 378 | PERF_RECORD_READ = 8, |
@@ -412,7 +410,7 @@ enum perf_event_type { | |||
412 | * char data[size];}&& PERF_SAMPLE_RAW | 410 | * char data[size];}&& PERF_SAMPLE_RAW |
413 | * }; | 411 | * }; |
414 | */ | 412 | */ |
415 | PERF_RECORD_SAMPLE = 9, | 413 | PERF_RECORD_SAMPLE = 9, |
416 | 414 | ||
417 | PERF_RECORD_MAX, /* non-ABI */ | 415 | PERF_RECORD_MAX, /* non-ABI */ |
418 | }; | 416 | }; |
@@ -478,9 +476,11 @@ struct hw_perf_event { | |||
478 | union { | 476 | union { |
479 | struct { /* hardware */ | 477 | struct { /* hardware */ |
480 | u64 config; | 478 | u64 config; |
479 | u64 last_tag; | ||
481 | unsigned long config_base; | 480 | unsigned long config_base; |
482 | unsigned long event_base; | 481 | unsigned long event_base; |
483 | int idx; | 482 | int idx; |
483 | int last_cpu; | ||
484 | }; | 484 | }; |
485 | struct { /* software */ | 485 | struct { /* software */ |
486 | s64 remaining; | 486 | s64 remaining; |
@@ -498,9 +498,8 @@ struct hw_perf_event { | |||
498 | atomic64_t period_left; | 498 | atomic64_t period_left; |
499 | u64 interrupts; | 499 | u64 interrupts; |
500 | 500 | ||
501 | u64 freq_count; | 501 | u64 freq_time_stamp; |
502 | u64 freq_interrupts; | 502 | u64 freq_count_stamp; |
503 | u64 freq_stamp; | ||
504 | #endif | 503 | #endif |
505 | }; | 504 | }; |
506 | 505 | ||
@@ -512,6 +511,8 @@ struct perf_event; | |||
512 | struct pmu { | 511 | struct pmu { |
513 | int (*enable) (struct perf_event *event); | 512 | int (*enable) (struct perf_event *event); |
514 | void (*disable) (struct perf_event *event); | 513 | void (*disable) (struct perf_event *event); |
514 | int (*start) (struct perf_event *event); | ||
515 | void (*stop) (struct perf_event *event); | ||
515 | void (*read) (struct perf_event *event); | 516 | void (*read) (struct perf_event *event); |
516 | void (*unthrottle) (struct perf_event *event); | 517 | void (*unthrottle) (struct perf_event *event); |
517 | }; | 518 | }; |
@@ -565,6 +566,10 @@ typedef void (*perf_overflow_handler_t)(struct perf_event *, int, | |||
565 | struct perf_sample_data *, | 566 | struct perf_sample_data *, |
566 | struct pt_regs *regs); | 567 | struct pt_regs *regs); |
567 | 568 | ||
569 | enum perf_group_flag { | ||
570 | PERF_GROUP_SOFTWARE = 0x1, | ||
571 | }; | ||
572 | |||
568 | /** | 573 | /** |
569 | * struct perf_event - performance event kernel representation: | 574 | * struct perf_event - performance event kernel representation: |
570 | */ | 575 | */ |
@@ -574,6 +579,7 @@ struct perf_event { | |||
574 | struct list_head event_entry; | 579 | struct list_head event_entry; |
575 | struct list_head sibling_list; | 580 | struct list_head sibling_list; |
576 | int nr_siblings; | 581 | int nr_siblings; |
582 | int group_flags; | ||
577 | struct perf_event *group_leader; | 583 | struct perf_event *group_leader; |
578 | struct perf_event *output; | 584 | struct perf_event *output; |
579 | const struct pmu *pmu; | 585 | const struct pmu *pmu; |
@@ -658,7 +664,7 @@ struct perf_event { | |||
658 | 664 | ||
659 | perf_overflow_handler_t overflow_handler; | 665 | perf_overflow_handler_t overflow_handler; |
660 | 666 | ||
661 | #ifdef CONFIG_EVENT_PROFILE | 667 | #ifdef CONFIG_EVENT_TRACING |
662 | struct event_filter *filter; | 668 | struct event_filter *filter; |
663 | #endif | 669 | #endif |
664 | 670 | ||
@@ -683,7 +689,8 @@ struct perf_event_context { | |||
683 | */ | 689 | */ |
684 | struct mutex mutex; | 690 | struct mutex mutex; |
685 | 691 | ||
686 | struct list_head group_list; | 692 | struct list_head pinned_groups; |
693 | struct list_head flexible_groups; | ||
687 | struct list_head event_list; | 694 | struct list_head event_list; |
688 | int nr_events; | 695 | int nr_events; |
689 | int nr_active; | 696 | int nr_active; |
@@ -746,10 +753,9 @@ extern int perf_max_events; | |||
746 | 753 | ||
747 | extern const struct pmu *hw_perf_event_init(struct perf_event *event); | 754 | extern const struct pmu *hw_perf_event_init(struct perf_event *event); |
748 | 755 | ||
749 | extern void perf_event_task_sched_in(struct task_struct *task, int cpu); | 756 | extern void perf_event_task_sched_in(struct task_struct *task); |
750 | extern void perf_event_task_sched_out(struct task_struct *task, | 757 | extern void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next); |
751 | struct task_struct *next, int cpu); | 758 | extern void perf_event_task_tick(struct task_struct *task); |
752 | extern void perf_event_task_tick(struct task_struct *task, int cpu); | ||
753 | extern int perf_event_init_task(struct task_struct *child); | 759 | extern int perf_event_init_task(struct task_struct *child); |
754 | extern void perf_event_exit_task(struct task_struct *child); | 760 | extern void perf_event_exit_task(struct task_struct *child); |
755 | extern void perf_event_free_task(struct task_struct *task); | 761 | extern void perf_event_free_task(struct task_struct *task); |
@@ -764,7 +770,7 @@ extern int perf_event_task_disable(void); | |||
764 | extern int perf_event_task_enable(void); | 770 | extern int perf_event_task_enable(void); |
765 | extern int hw_perf_group_sched_in(struct perf_event *group_leader, | 771 | extern int hw_perf_group_sched_in(struct perf_event *group_leader, |
766 | struct perf_cpu_context *cpuctx, | 772 | struct perf_cpu_context *cpuctx, |
767 | struct perf_event_context *ctx, int cpu); | 773 | struct perf_event_context *ctx); |
768 | extern void perf_event_update_userpage(struct perf_event *event); | 774 | extern void perf_event_update_userpage(struct perf_event *event); |
769 | extern int perf_event_release_kernel(struct perf_event *event); | 775 | extern int perf_event_release_kernel(struct perf_event *event); |
770 | extern struct perf_event * | 776 | extern struct perf_event * |
@@ -853,8 +859,7 @@ extern int sysctl_perf_event_mlock; | |||
853 | extern int sysctl_perf_event_sample_rate; | 859 | extern int sysctl_perf_event_sample_rate; |
854 | 860 | ||
855 | extern void perf_event_init(void); | 861 | extern void perf_event_init(void); |
856 | extern void perf_tp_event(int event_id, u64 addr, u64 count, | 862 | 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); | 863 | extern void perf_bp_event(struct perf_event *event, void *data); |
859 | 864 | ||
860 | #ifndef perf_misc_flags | 865 | #ifndef perf_misc_flags |
@@ -875,12 +880,12 @@ extern void perf_event_enable(struct perf_event *event); | |||
875 | extern void perf_event_disable(struct perf_event *event); | 880 | extern void perf_event_disable(struct perf_event *event); |
876 | #else | 881 | #else |
877 | static inline void | 882 | static inline void |
878 | perf_event_task_sched_in(struct task_struct *task, int cpu) { } | 883 | perf_event_task_sched_in(struct task_struct *task) { } |
879 | static inline void | 884 | static inline void |
880 | perf_event_task_sched_out(struct task_struct *task, | 885 | perf_event_task_sched_out(struct task_struct *task, |
881 | struct task_struct *next, int cpu) { } | 886 | struct task_struct *next) { } |
882 | static inline void | 887 | static inline void |
883 | perf_event_task_tick(struct task_struct *task, int cpu) { } | 888 | perf_event_task_tick(struct task_struct *task) { } |
884 | static inline int perf_event_init_task(struct task_struct *child) { return 0; } | 889 | static inline int perf_event_init_task(struct task_struct *child) { return 0; } |
885 | static inline void perf_event_exit_task(struct task_struct *child) { } | 890 | static inline void perf_event_exit_task(struct task_struct *child) { } |
886 | static inline void perf_event_free_task(struct task_struct *task) { } | 891 | static inline void perf_event_free_task(struct task_struct *task) { } |
@@ -895,13 +900,13 @@ static inline void | |||
895 | perf_sw_event(u32 event_id, u64 nr, int nmi, | 900 | perf_sw_event(u32 event_id, u64 nr, int nmi, |
896 | struct pt_regs *regs, u64 addr) { } | 901 | struct pt_regs *regs, u64 addr) { } |
897 | static inline void | 902 | static inline void |
898 | perf_bp_event(struct perf_event *event, void *data) { } | 903 | perf_bp_event(struct perf_event *event, void *data) { } |
899 | 904 | ||
900 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 905 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
901 | static inline void perf_event_comm(struct task_struct *tsk) { } | 906 | static inline void perf_event_comm(struct task_struct *tsk) { } |
902 | static inline void perf_event_fork(struct task_struct *tsk) { } | 907 | static inline void perf_event_fork(struct task_struct *tsk) { } |
903 | static inline void perf_event_init(void) { } | 908 | static inline void perf_event_init(void) { } |
904 | static inline int perf_swevent_get_recursion_context(void) { return -1; } | 909 | static inline int perf_swevent_get_recursion_context(void) { return -1; } |
905 | static inline void perf_swevent_put_recursion_context(int rctx) { } | 910 | static inline void perf_swevent_put_recursion_context(int rctx) { } |
906 | static inline void perf_event_enable(struct perf_event *event) { } | 911 | static inline void perf_event_enable(struct perf_event *event) { } |
907 | static inline void perf_event_disable(struct perf_event *event) { } | 912 | static inline void perf_event_disable(struct perf_event *event) { } |