21 #include <linux/kernel.h>
22 #include <linux/module.h>
26 #include <linux/sched.h>
28 static char func_name[
NAME_MAX] =
"do_fork";
31 " function's execution time");
58 int retval = regs_return_value(regs);
66 func_name, retval, (
long long)
delta);
71 .handler = ret_handler,
73 .data_size =
sizeof(
struct my_data),
78 static int __init kretprobe_init(
void)
82 my_kretprobe.
kp.symbol_name = func_name;
90 my_kretprobe.
kp.symbol_name, my_kretprobe.
kp.addr);
94 static void __exit kretprobe_exit(
void)
98 my_kretprobe.
kp.addr);
102 my_kretprobe.
nmissed, my_kretprobe.
kp.symbol_name);