summaryrefslogtreecommitdiffstats
path: root/arch/x86/oprofile
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2016-02-18 04:58:57 +0100
committerDavid S. Miller <davem@davemloft.net>2016-02-20 06:21:44 +0100
commit568b329a02f75ed3aaae5eb2cca384cb9e09cb29 (patch)
treeae50fa4f98c1c7ad07ad834677be3304a282499e /arch/x86/oprofile
parentnet: use skb_postpush_rcsum instead of own implementations (diff)
downloadlinux-568b329a02f75ed3aaae5eb2cca384cb9e09cb29.tar.xz
linux-568b329a02f75ed3aaae5eb2cca384cb9e09cb29.zip
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c
index 4e664bdb535a..cb31a4440e58 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 = {