diff options
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 8fa71874113..556b0f4a668 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 | }; |
@@ -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 | ||
@@ -565,6 +564,10 @@ typedef void (*perf_overflow_handler_t)(struct perf_event *, int, | |||
565 | struct perf_sample_data *, | 564 | struct perf_sample_data *, |
566 | struct pt_regs *regs); | 565 | struct pt_regs *regs); |
567 | 566 | ||
567 | enum perf_group_flag { | ||
568 | PERF_GROUP_SOFTWARE = 0x1, | ||
569 | }; | ||
570 | |||
568 | /** | 571 | /** |
569 | * struct perf_event - performance event kernel representation: | 572 | * struct perf_event - performance event kernel representation: |
570 | */ | 573 | */ |
@@ -574,6 +577,7 @@ struct perf_event { | |||
574 | struct list_head event_entry; | 577 | struct list_head event_entry; |
575 | struct list_head sibling_list; | 578 | struct list_head sibling_list; |
576 | int nr_siblings; | 579 | int nr_siblings; |
580 | int group_flags; | ||
577 | struct perf_event *group_leader; | 581 | struct perf_event *group_leader; |
578 | struct perf_event *output; | 582 | struct perf_event *output; |
579 | const struct pmu *pmu; | 583 | const struct pmu *pmu; |
@@ -658,7 +662,7 @@ struct perf_event { | |||
658 | 662 | ||
659 | perf_overflow_handler_t overflow_handler; | 663 | perf_overflow_handler_t overflow_handler; |
660 | 664 | ||
661 | #ifdef CONFIG_EVENT_PROFILE | 665 | #ifdef CONFIG_EVENT_TRACING |
662 | struct event_filter *filter; | 666 | struct event_filter *filter; |
663 | #endif | 667 | #endif |
664 | 668 | ||
@@ -683,7 +687,8 @@ struct perf_event_context { | |||
683 | */ | 687 | */ |
684 | struct mutex mutex; | 688 | struct mutex mutex; |
685 | 689 | ||
686 | struct list_head group_list; | 690 | struct list_head pinned_groups; |
691 | struct list_head flexible_groups; | ||
687 | struct list_head event_list; | 692 | struct list_head event_list; |
688 | int nr_events; | 693 | int nr_events; |
689 | int nr_active; | 694 | int nr_active; |
@@ -746,10 +751,9 @@ extern int perf_max_events; | |||
746 | 751 | ||
747 | 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); |
748 | 753 | ||
749 | extern void perf_event_task_sched_in(struct task_struct *task, int cpu); | 754 | extern void perf_event_task_sched_in(struct task_struct *task); |
750 | 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); |
751 | struct task_struct *next, int cpu); | 756 | 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); | 757 | extern int perf_event_init_task(struct task_struct *child); |
754 | extern void perf_event_exit_task(struct task_struct *child); | 758 | extern void perf_event_exit_task(struct task_struct *child); |
755 | extern void perf_event_free_task(struct task_struct *task); | 759 | extern void perf_event_free_task(struct task_struct *task); |
@@ -853,8 +857,7 @@ extern int sysctl_perf_event_mlock; | |||
853 | extern int sysctl_perf_event_sample_rate; | 857 | extern int sysctl_perf_event_sample_rate; |
854 | 858 | ||
855 | extern void perf_event_init(void); | 859 | extern void perf_event_init(void); |
856 | extern void perf_tp_event(int event_id, u64 addr, u64 count, | 860 | 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); | 861 | extern void perf_bp_event(struct perf_event *event, void *data); |
859 | 862 | ||
860 | #ifndef perf_misc_flags | 863 | #ifndef perf_misc_flags |
@@ -875,12 +878,12 @@ extern void perf_event_enable(struct perf_event *event); | |||
875 | extern void perf_event_disable(struct perf_event *event); | 878 | extern void perf_event_disable(struct perf_event *event); |
876 | #else | 879 | #else |
877 | static inline void | 880 | static inline void |
878 | perf_event_task_sched_in(struct task_struct *task, int cpu) { } | 881 | perf_event_task_sched_in(struct task_struct *task) { } |
879 | static inline void | 882 | static inline void |
880 | perf_event_task_sched_out(struct task_struct *task, | 883 | perf_event_task_sched_out(struct task_struct *task, |
881 | struct task_struct *next, int cpu) { } | 884 | struct task_struct *next) { } |
882 | static inline void | 885 | static inline void |
883 | perf_event_task_tick(struct task_struct *task, int cpu) { } | 886 | perf_event_task_tick(struct task_struct *task) { } |
884 | static inline int perf_event_init_task(struct task_struct *child) { return 0; } | 887 | 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) { } | 888 | static inline void perf_event_exit_task(struct task_struct *child) { } |
886 | static inline void perf_event_free_task(struct task_struct *task) { } | 889 | static inline void perf_event_free_task(struct task_struct *task) { } |
@@ -895,13 +898,13 @@ static inline void | |||
895 | perf_sw_event(u32 event_id, u64 nr, int nmi, | 898 | perf_sw_event(u32 event_id, u64 nr, int nmi, |
896 | struct pt_regs *regs, u64 addr) { } | 899 | struct pt_regs *regs, u64 addr) { } |
897 | static inline void | 900 | static inline void |
898 | perf_bp_event(struct perf_event *event, void *data) { } | 901 | perf_bp_event(struct perf_event *event, void *data) { } |
899 | 902 | ||
900 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } | 903 | static inline void perf_event_mmap(struct vm_area_struct *vma) { } |
901 | static inline void perf_event_comm(struct task_struct *tsk) { } | 904 | static inline void perf_event_comm(struct task_struct *tsk) { } |
902 | static inline void perf_event_fork(struct task_struct *tsk) { } | 905 | static inline void perf_event_fork(struct task_struct *tsk) { } |
903 | static inline void perf_event_init(void) { } | 906 | static inline void perf_event_init(void) { } |
904 | static inline int perf_swevent_get_recursion_context(void) { return -1; } | 907 | static inline int perf_swevent_get_recursion_context(void) { return -1; } |
905 | static inline void perf_swevent_put_recursion_context(int rctx) { } | 908 | static inline void perf_swevent_put_recursion_context(int rctx) { } |
906 | static inline void perf_event_enable(struct perf_event *event) { } | 909 | static inline void perf_event_enable(struct perf_event *event) { } |
907 | static inline void perf_event_disable(struct perf_event *event) { } | 910 | static inline void perf_event_disable(struct perf_event *event) { } |