aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-07-12 09:55:54 -0400
committerVineet Gupta <vgupta@synopsys.com>2015-04-20 08:57:35 -0400
commit22f6b899125063c5dc955dd378c408b14d80b020 (patch)
tree677996c14b63020d4050ad4669f5b99dc99150ae /arch/arc
parent389e3160b9b0002f8e7c95e9c0af5da6da311892 (diff)
ARC: perf: add user space attribution in callchains
The actual user space unwinding is more involved, so simply capture the user space PC Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/kernel/perf_event.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c
index a6ad1e09e4be..109118a4245e 100644
--- a/arch/arc/kernel/perf_event.c
+++ b/arch/arc/kernel/perf_event.c
@@ -54,6 +54,16 @@ perf_callchain_kernel(struct perf_callchain_entry *entry, struct pt_regs *regs)
54 arc_unwind_core(NULL, regs, callchain_trace, &ctrl); 54 arc_unwind_core(NULL, regs, callchain_trace, &ctrl);
55} 55}
56 56
57void
58perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
59{
60 /*
61 * User stack can't be unwound trivially with kernel dwarf unwinder
62 * So for now just record the user PC
63 */
64 perf_callchain_store(entry, instruction_pointer(regs));
65}
66
57static struct arc_pmu *arc_pmu; 67static struct arc_pmu *arc_pmu;
58 68
59/* read counter #idx; note that counter# != event# on ARC! */ 69/* read counter #idx; note that counter# != event# on ARC! */