aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/perf_event.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2010-06-30 20:31:21 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-08-18 19:32:11 -0400
commitf72c1a931e311bb7780fee19e41a89ac42cab50e (patch)
tree470aa111c535af47d8444a249c83b5d360806e69 /arch/sparc/kernel/perf_event.c
parent56962b4449af34070bb1994621ef4f0265eed4d8 (diff)
perf: Factorize callchain context handling
Store the kernel and user contexts from the generic layer instead of archs, this gathers some repetitive code. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: Paul Mackerras <paulus@samba.org> Tested-by: Will Deacon <will.deacon@arm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Stephane Eranian <eranian@google.com> Cc: David Miller <davem@davemloft.net> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Borislav Petkov <bp@amd64.org>
Diffstat (limited to 'arch/sparc/kernel/perf_event.c')
-rw-r--r--arch/sparc/kernel/perf_event.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
index 460162d74aba..4bc402938575 100644
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1293,7 +1293,6 @@ void perf_callchain_kernel(struct perf_callchain_entry *entry,
1293 1293
1294 stack_trace_flush(); 1294 stack_trace_flush();
1295 1295
1296 perf_callchain_store(entry, PERF_CONTEXT_KERNEL);
1297 perf_callchain_store(entry, regs->tpc); 1296 perf_callchain_store(entry, regs->tpc);
1298 1297
1299 ksp = regs->u_regs[UREG_I6]; 1298 ksp = regs->u_regs[UREG_I6];
@@ -1337,7 +1336,6 @@ static void perf_callchain_user_64(struct perf_callchain_entry *entry,
1337{ 1336{
1338 unsigned long ufp; 1337 unsigned long ufp;
1339 1338
1340 perf_callchain_store(entry, PERF_CONTEXT_USER);
1341 perf_callchain_store(entry, regs->tpc); 1339 perf_callchain_store(entry, regs->tpc);
1342 1340
1343 ufp = regs->u_regs[UREG_I6] + STACK_BIAS; 1341 ufp = regs->u_regs[UREG_I6] + STACK_BIAS;
@@ -1360,7 +1358,6 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry,
1360{ 1358{
1361 unsigned long ufp; 1359 unsigned long ufp;
1362 1360
1363 perf_callchain_store(entry, PERF_CONTEXT_USER);
1364 perf_callchain_store(entry, regs->tpc); 1361 perf_callchain_store(entry, regs->tpc);
1365 1362
1366 ufp = regs->u_regs[UREG_I6] & 0xffffffffUL; 1363 ufp = regs->u_regs[UREG_I6] & 0xffffffffUL;