Skip to content

Commit

Permalink
ARC: perf: add user space attribution in callchains
Browse files Browse the repository at this point in the history
The actual user space unwinding is more involved, so simply capture the
user space PC

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Vineet Gupta committed Apr 20, 2015
1 parent 389e316 commit 22f6b89
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/arc/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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! */
Expand Down

0 comments on commit 22f6b89

Please sign in to comment.