diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:39:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:39:42 -0500 |
commit | 9fdfbc2bff587f454dd95e2caa6d147c9abe39e4 (patch) | |
tree | 2feaee47cbcfb57dd0d5cf23509e22011541e717 /include | |
parent | 8cea4eb642890a1de58980e7e1617d1765ef8f7c (diff) | |
parent | dc1d628a67a8f042e711ea5accc0beedc3ef0092 (diff) |
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf: Provide generic perf_sample_data initialization
MAINTAINERS: Add Arnaldo as tools/perf/ co-maintainer
perf trace: Don't use pager if scripting
perf trace/scripting: Remove extraneous header read
perf, ARM: Modify kuser rmb() call to compile for Thumb-2
x86/stacktrace: Don't dereference bad frame pointers
perf archive: Don't try to collect files without a build-id
perf_events, x86: Fixup fixed counter constraints
perf, x86: Restrict the ANY flag
perf, x86: rename macro in ARCH_PERFMON_EVENTSEL_ENABLE
perf, x86: add some IBS macros to perf_event.h
perf, x86: make IBS macros available in perf_event.h
hw-breakpoints: Remove stub unthrottle callback
x86/hw-breakpoints: Remove the name field
perf: Remove pointless breakpoint union
perf lock: Drop the buffers multiplexing dependency
perf lock: Fix and add misc documentally things
percpu: Add __percpu sparse annotations to hw_breakpoint
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hw_breakpoint.h | 8 | ||||
-rw-r--r-- | include/linux/perf_event.h | 27 |
2 files changed, 28 insertions, 7 deletions
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index 5977b724f7c6..c70d27af03f9 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
@@ -66,14 +66,14 @@ register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | |||
66 | perf_overflow_handler_t triggered, | 66 | perf_overflow_handler_t triggered, |
67 | int cpu); | 67 | int cpu); |
68 | 68 | ||
69 | extern struct perf_event ** | 69 | extern struct perf_event * __percpu * |
70 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 70 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
71 | perf_overflow_handler_t triggered); | 71 | perf_overflow_handler_t triggered); |
72 | 72 | ||
73 | extern int register_perf_hw_breakpoint(struct perf_event *bp); | 73 | extern int register_perf_hw_breakpoint(struct perf_event *bp); |
74 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); | 74 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); |
75 | extern void unregister_hw_breakpoint(struct perf_event *bp); | 75 | extern void unregister_hw_breakpoint(struct perf_event *bp); |
76 | extern void unregister_wide_hw_breakpoint(struct perf_event **cpu_events); | 76 | extern void unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events); |
77 | 77 | ||
78 | extern int dbg_reserve_bp_slot(struct perf_event *bp); | 78 | extern int dbg_reserve_bp_slot(struct perf_event *bp); |
79 | extern int dbg_release_bp_slot(struct perf_event *bp); | 79 | extern int dbg_release_bp_slot(struct perf_event *bp); |
@@ -100,7 +100,7 @@ static inline struct perf_event * | |||
100 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | 100 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, |
101 | perf_overflow_handler_t triggered, | 101 | perf_overflow_handler_t triggered, |
102 | int cpu) { return NULL; } | 102 | int cpu) { return NULL; } |
103 | static inline struct perf_event ** | 103 | static inline struct perf_event * __percpu * |
104 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 104 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
105 | perf_overflow_handler_t triggered) { return NULL; } | 105 | perf_overflow_handler_t triggered) { return NULL; } |
106 | static inline int | 106 | static inline int |
@@ -109,7 +109,7 @@ static inline int | |||
109 | __register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } | 109 | __register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } |
110 | static inline void unregister_hw_breakpoint(struct perf_event *bp) { } | 110 | static inline void unregister_hw_breakpoint(struct perf_event *bp) { } |
111 | static inline void | 111 | static inline void |
112 | unregister_wide_hw_breakpoint(struct perf_event **cpu_events) { } | 112 | unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events) { } |
113 | static inline int | 113 | static inline int |
114 | reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } | 114 | reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } |
115 | static inline void release_bp_slot(struct perf_event *bp) { } | 115 | static inline void release_bp_slot(struct perf_event *bp) { } |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 7b18b4fd5df7..6f8cd7da1a01 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -487,9 +487,8 @@ struct hw_perf_event { | |||
487 | struct hrtimer hrtimer; | 487 | struct hrtimer hrtimer; |
488 | }; | 488 | }; |
489 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 489 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
490 | union { /* breakpoint */ | 490 | /* breakpoint */ |
491 | struct arch_hw_breakpoint info; | 491 | struct arch_hw_breakpoint info; |
492 | }; | ||
493 | #endif | 492 | #endif |
494 | }; | 493 | }; |
495 | atomic64_t prev_count; | 494 | atomic64_t prev_count; |
@@ -802,6 +801,13 @@ struct perf_sample_data { | |||
802 | struct perf_raw_record *raw; | 801 | struct perf_raw_record *raw; |
803 | }; | 802 | }; |
804 | 803 | ||
804 | static inline | ||
805 | void perf_sample_data_init(struct perf_sample_data *data, u64 addr) | ||
806 | { | ||
807 | data->addr = addr; | ||
808 | data->raw = NULL; | ||
809 | } | ||
810 | |||
805 | extern void perf_output_sample(struct perf_output_handle *handle, | 811 | extern void perf_output_sample(struct perf_output_handle *handle, |
806 | struct perf_event_header *header, | 812 | struct perf_event_header *header, |
807 | struct perf_sample_data *data, | 813 | struct perf_sample_data *data, |
@@ -858,6 +864,21 @@ extern int sysctl_perf_event_paranoid; | |||
858 | extern int sysctl_perf_event_mlock; | 864 | extern int sysctl_perf_event_mlock; |
859 | extern int sysctl_perf_event_sample_rate; | 865 | extern int sysctl_perf_event_sample_rate; |
860 | 866 | ||
867 | static inline bool perf_paranoid_tracepoint_raw(void) | ||
868 | { | ||
869 | return sysctl_perf_event_paranoid > -1; | ||
870 | } | ||
871 | |||
872 | static inline bool perf_paranoid_cpu(void) | ||
873 | { | ||
874 | return sysctl_perf_event_paranoid > 0; | ||
875 | } | ||
876 | |||
877 | static inline bool perf_paranoid_kernel(void) | ||
878 | { | ||
879 | return sysctl_perf_event_paranoid > 1; | ||
880 | } | ||
881 | |||
861 | extern void perf_event_init(void); | 882 | extern void perf_event_init(void); |
862 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); | 883 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); |
863 | extern void perf_bp_event(struct perf_event *event, void *data); | 884 | extern void perf_bp_event(struct perf_event *event, void *data); |