summaryrefslogtreecommitdiff
path: root/samples/fprobe/fprobe_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/fprobe/fprobe_example.c')
-rw-r--r--samples/fprobe/fprobe_example.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/samples/fprobe/fprobe_example.c b/samples/fprobe/fprobe_example.c
index e22da8573116..64e715e7ed11 100644
--- a/samples/fprobe/fprobe_example.c
+++ b/samples/fprobe/fprobe_example.c
@@ -48,7 +48,9 @@ static void show_backtrace(void)
stack_trace_print(stacks, len, 24);
}
-static void sample_entry_handler(struct fprobe *fp, unsigned long ip, struct pt_regs *regs)
+static int sample_entry_handler(struct fprobe *fp, unsigned long ip,
+ unsigned long ret_ip,
+ struct pt_regs *regs, void *data)
{
if (use_trace)
/*
@@ -61,11 +63,14 @@ static void sample_entry_handler(struct fprobe *fp, unsigned long ip, struct pt_
nhit++;
if (stackdump)
show_backtrace();
+ return 0;
}
-static void sample_exit_handler(struct fprobe *fp, unsigned long ip, struct pt_regs *regs)
+static void sample_exit_handler(struct fprobe *fp, unsigned long ip,
+ unsigned long ret_ip, struct pt_regs *regs,
+ void *data)
{
- unsigned long rip = instruction_pointer(regs);
+ unsigned long rip = ret_ip;
if (use_trace)
/*