summaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-06-09 18:55:20 +0200
committerIngo Molnar <mingo@elte.hu>2010-06-09 18:55:57 +0200
commitc726b61c6a5acc54c55ed7a0e7638cc4c5a100a8 (patch)
tree3f44aa013d31d34951e9610e79ff14c1148ad6ac /include/linux/perf_event.h
parent7be7923633a142402266d642ccebf74f556a649b (diff)
parent018378c55b03f88ff513aba4e0e93b8d4a9cf241 (diff)
downloadop-kernel-dev-c726b61c6a5acc54c55ed7a0e7638cc4c5a100a8.zip
op-kernel-dev-c726b61c6a5acc54c55ed7a0e7638cc4c5a100a8.tar.gz
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/core
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h32
1 files changed, 7 insertions, 25 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 1218d05..63b5aa5 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -932,8 +932,10 @@ extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX];
extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64);
-extern void
-perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip);
+#ifndef perf_arch_fetch_caller_regs
+static inline void
+perf_arch_fetch_caller_regs(struct regs *regs, unsigned long ip) { }
+#endif
/*
* Take a snapshot of the regs. Skip ip and frame pointer to
@@ -943,31 +945,11 @@ perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip);
* - bp for callchains
* - eflags, for future purposes, just in case
*/
-static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip)
+static inline void perf_fetch_caller_regs(struct pt_regs *regs)
{
- unsigned long ip;
-
memset(regs, 0, sizeof(*regs));
- switch (skip) {
- case 1 :
- ip = CALLER_ADDR0;
- break;
- case 2 :
- ip = CALLER_ADDR1;
- break;
- case 3 :
- ip = CALLER_ADDR2;
- break;
- case 4:
- ip = CALLER_ADDR3;
- break;
- /* No need to support further for now */
- default:
- ip = 0;
- }
-
- return perf_arch_fetch_caller_regs(regs, ip, skip);
+ perf_arch_fetch_caller_regs(regs, CALLER_ADDR0);
}
static inline void
@@ -977,7 +959,7 @@ perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr)
struct pt_regs hot_regs;
if (!regs) {
- perf_fetch_caller_regs(&hot_regs, 1);
+ perf_fetch_caller_regs(&hot_regs);
regs = &hot_regs;
}
__perf_sw_event(event_id, nr, nmi, regs, addr);
OpenPOWER on IntegriCloud