diff options
author | Alexei Starovoitov <ast@fb.com> | 2016-02-18 03:58:57 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-20 05:21:44 (GMT) |
commit | 568b329a02f75ed3aaae5eb2cca384cb9e09cb29 (patch) | |
tree | ae50fa4f98c1c7ad07ad834677be3304a282499e /arch/x86/oprofile | |
parent | 6b83d28a55a891a9d70fc61ccb1c138e47dcbe74 (diff) | |
download | linux-568b329a02f75ed3aaae5eb2cca384cb9e09cb29.tar.xz |
perf: generalize perf_callchain
. avoid walking the stack when there is no room left in the buffer
. generalize get_perf_callchain() to be called from bpf helper
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/x86/oprofile')
-rw-r--r-- | arch/x86/oprofile/backtrace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c index 4e664bd..cb31a44 100644 --- a/arch/x86/oprofile/backtrace.c +++ b/arch/x86/oprofile/backtrace.c @@ -23,12 +23,13 @@ static int backtrace_stack(void *data, char *name) return 0; } -static void backtrace_address(void *data, unsigned long addr, int reliable) +static int backtrace_address(void *data, unsigned long addr, int reliable) { unsigned int *depth = data; if ((*depth)--) oprofile_add_trace(addr); + return 0; } static struct stacktrace_ops backtrace_ops = { |