diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-04-02 13:37:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-02 13:38:10 -0400 |
commit | ec5e61aabeac58670691bd0613388d16697d0d81 (patch) | |
tree | 59838509358f27334874b90756505785cde29b02 /include/linux/perf_event.h | |
parent | 75ec5a245c7763c397f31ec8964d0a46c54a7386 (diff) | |
parent | 8bb39f9aa068262732fe44b965d7a6eb5a5a7d67 (diff) |
Merge branch 'perf/urgent' into perf/core
Conflicts:
arch/x86/kernel/cpu/perf_event.c
Merge reason: Resolve the conflict, pick up fixes
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 2bccb7b9da2d..6e96cc8225d4 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -860,13 +860,6 @@ extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; | |||
860 | 860 | ||
861 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); | 861 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); |
862 | 862 | ||
863 | static inline void | ||
864 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | ||
865 | { | ||
866 | if (atomic_read(&perf_swevent_enabled[event_id])) | ||
867 | __perf_sw_event(event_id, nr, nmi, regs, addr); | ||
868 | } | ||
869 | |||
870 | extern void | 863 | extern void |
871 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); | 864 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); |
872 | 865 | ||
@@ -905,6 +898,20 @@ static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip) | |||
905 | return perf_arch_fetch_caller_regs(regs, ip, skip); | 898 | return perf_arch_fetch_caller_regs(regs, ip, skip); |
906 | } | 899 | } |
907 | 900 | ||
901 | static inline void | ||
902 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | ||
903 | { | ||
904 | if (atomic_read(&perf_swevent_enabled[event_id])) { | ||
905 | struct pt_regs hot_regs; | ||
906 | |||
907 | if (!regs) { | ||
908 | perf_fetch_caller_regs(&hot_regs, 1); | ||
909 | regs = &hot_regs; | ||
910 | } | ||
911 | __perf_sw_event(event_id, nr, nmi, regs, addr); | ||
912 | } | ||
913 | } | ||
914 | |||
908 | extern void __perf_event_mmap(struct vm_area_struct *vma); | 915 | extern void __perf_event_mmap(struct vm_area_struct *vma); |
909 | 916 | ||
910 | static inline void perf_event_mmap(struct vm_area_struct *vma) | 917 | static inline void perf_event_mmap(struct vm_area_struct *vma) |