aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-04-02 13:37:50 -0400
committerIngo Molnar <mingo@elte.hu>2010-04-02 13:38:10 -0400
commitec5e61aabeac58670691bd0613388d16697d0d81 (patch)
tree59838509358f27334874b90756505785cde29b02 /include/linux/perf_event.h
parent75ec5a245c7763c397f31ec8964d0a46c54a7386 (diff)
parent8bb39f9aa068262732fe44b965d7a6eb5a5a7d67 (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.h21
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
861extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); 861extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64);
862 862
863static inline void
864perf_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
870extern void 863extern void
871perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); 864perf_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
901static inline void
902perf_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
908extern void __perf_event_mmap(struct vm_area_struct *vma); 915extern void __perf_event_mmap(struct vm_area_struct *vma);
909 916
910static inline void perf_event_mmap(struct vm_area_struct *vma) 917static inline void perf_event_mmap(struct vm_area_struct *vma)