From 22f6b899125063c5dc955dd378c408b14d80b020 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Fri, 12 Jul 2013 15:55:54 +0200 Subject: 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 --- arch/arc/kernel/perf_event.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c index a6ad1e0..109118a 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) arc_unwind_core(NULL, regs, callchain_trace, &ctrl); } +void +perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) +{ + /* + * User stack can't be unwound trivially with kernel dwarf unwinder + * So for now just record the user PC + */ + perf_callchain_store(entry, instruction_pointer(regs)); +} + static struct arc_pmu *arc_pmu; /* read counter #idx; note that counter# != event# on ARC! */ -- cgit v1.1