diff options
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 3fd5c82e0e1..5d0266d9498 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -485,6 +485,7 @@ struct perf_guest_info_callbacks { | |||
485 | #include <linux/ftrace.h> | 485 | #include <linux/ftrace.h> |
486 | #include <linux/cpu.h> | 486 | #include <linux/cpu.h> |
487 | #include <asm/atomic.h> | 487 | #include <asm/atomic.h> |
488 | #include <asm/local.h> | ||
488 | 489 | ||
489 | #define PERF_MAX_STACK_DEPTH 255 | 490 | #define PERF_MAX_STACK_DEPTH 255 |
490 | 491 | ||
@@ -584,24 +585,22 @@ enum perf_event_active_state { | |||
584 | struct file; | 585 | struct file; |
585 | 586 | ||
586 | struct perf_mmap_data { | 587 | struct perf_mmap_data { |
588 | atomic_t refcount; | ||
587 | struct rcu_head rcu_head; | 589 | struct rcu_head rcu_head; |
588 | #ifdef CONFIG_PERF_USE_VMALLOC | 590 | #ifdef CONFIG_PERF_USE_VMALLOC |
589 | struct work_struct work; | 591 | struct work_struct work; |
592 | int page_order; /* allocation order */ | ||
590 | #endif | 593 | #endif |
591 | int data_order; | ||
592 | int nr_pages; /* nr of data pages */ | 594 | int nr_pages; /* nr of data pages */ |
593 | int writable; /* are we writable */ | 595 | int writable; /* are we writable */ |
594 | int nr_locked; /* nr pages mlocked */ | ||
595 | 596 | ||
596 | atomic_t poll; /* POLL_ for wakeups */ | 597 | atomic_t poll; /* POLL_ for wakeups */ |
597 | atomic_t events; /* event_id limit */ | ||
598 | |||
599 | atomic_long_t head; /* write position */ | ||
600 | atomic_long_t done_head; /* completed head */ | ||
601 | 598 | ||
602 | atomic_t lock; /* concurrent writes */ | 599 | local_t head; /* write position */ |
603 | atomic_t wakeup; /* needs a wakeup */ | 600 | local_t nest; /* nested writers */ |
604 | atomic_t lost; /* nr records lost */ | 601 | local_t events; /* event limit */ |
602 | local_t wakeup; /* wakeup stamp */ | ||
603 | local_t lost; /* nr records lost */ | ||
605 | 604 | ||
606 | long watermark; /* wakeup watermark */ | 605 | long watermark; /* wakeup watermark */ |
607 | 606 | ||
@@ -632,6 +631,9 @@ struct swevent_hlist { | |||
632 | struct rcu_head rcu_head; | 631 | struct rcu_head rcu_head; |
633 | }; | 632 | }; |
634 | 633 | ||
634 | #define PERF_ATTACH_CONTEXT 0x01 | ||
635 | #define PERF_ATTACH_GROUP 0x02 | ||
636 | |||
635 | /** | 637 | /** |
636 | * struct perf_event - performance event kernel representation: | 638 | * struct perf_event - performance event kernel representation: |
637 | */ | 639 | */ |
@@ -644,10 +646,10 @@ struct perf_event { | |||
644 | int nr_siblings; | 646 | int nr_siblings; |
645 | int group_flags; | 647 | int group_flags; |
646 | struct perf_event *group_leader; | 648 | struct perf_event *group_leader; |
647 | struct perf_event *output; | ||
648 | const struct pmu *pmu; | 649 | const struct pmu *pmu; |
649 | 650 | ||
650 | enum perf_event_active_state state; | 651 | enum perf_event_active_state state; |
652 | unsigned int attach_state; | ||
651 | atomic64_t count; | 653 | atomic64_t count; |
652 | 654 | ||
653 | /* | 655 | /* |
@@ -705,6 +707,8 @@ struct perf_event { | |||
705 | /* mmap bits */ | 707 | /* mmap bits */ |
706 | struct mutex mmap_mutex; | 708 | struct mutex mmap_mutex; |
707 | atomic_t mmap_count; | 709 | atomic_t mmap_count; |
710 | int mmap_locked; | ||
711 | struct user_struct *mmap_user; | ||
708 | struct perf_mmap_data *data; | 712 | struct perf_mmap_data *data; |
709 | 713 | ||
710 | /* poll related */ | 714 | /* poll related */ |
@@ -728,6 +732,7 @@ struct perf_event { | |||
728 | perf_overflow_handler_t overflow_handler; | 732 | perf_overflow_handler_t overflow_handler; |
729 | 733 | ||
730 | #ifdef CONFIG_EVENT_TRACING | 734 | #ifdef CONFIG_EVENT_TRACING |
735 | struct ftrace_event_call *tp_event; | ||
731 | struct event_filter *filter; | 736 | struct event_filter *filter; |
732 | #endif | 737 | #endif |
733 | 738 | ||
@@ -803,11 +808,12 @@ struct perf_cpu_context { | |||
803 | struct perf_output_handle { | 808 | struct perf_output_handle { |
804 | struct perf_event *event; | 809 | struct perf_event *event; |
805 | struct perf_mmap_data *data; | 810 | struct perf_mmap_data *data; |
806 | unsigned long head; | 811 | unsigned long wakeup; |
807 | unsigned long offset; | 812 | unsigned long size; |
813 | void *addr; | ||
814 | int page; | ||
808 | int nmi; | 815 | int nmi; |
809 | int sample; | 816 | int sample; |
810 | int locked; | ||
811 | }; | 817 | }; |
812 | 818 | ||
813 | #ifdef CONFIG_PERF_EVENTS | 819 | #ifdef CONFIG_PERF_EVENTS |
@@ -993,8 +999,9 @@ static inline bool perf_paranoid_kernel(void) | |||
993 | } | 999 | } |
994 | 1000 | ||
995 | extern void perf_event_init(void); | 1001 | extern void perf_event_init(void); |
996 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, | 1002 | extern void perf_tp_event(u64 addr, u64 count, void *record, |
997 | int entry_size, struct pt_regs *regs); | 1003 | int entry_size, struct pt_regs *regs, |
1004 | struct hlist_head *head); | ||
998 | extern void perf_bp_event(struct perf_event *event, void *data); | 1005 | extern void perf_bp_event(struct perf_event *event, void *data); |
999 | 1006 | ||
1000 | #ifndef perf_misc_flags | 1007 | #ifndef perf_misc_flags |