/* Return-probe handler: Log the return value and duration. Duration may turn out to be zero consistently, depending upon the granularity of time accounting on the platform.  */
static int ret_handler(struct kretprobe_instance *ri, struct pt_regs *regs)
/* Return-probe handler: Log the return value and duration. Duration may turn out to be zero consistently, depending upon the granularity of time accounting on the platform.  */
static int ret_handler(struct kretprobe_instance *ri, struct pt_regs *regs)
{
	int retval = regs_return_value(regs);
	struct my_data *data = (struct my_data *)ri->data;
	s64 delta;
	ktime_t now;
	now = ktime_get();
	delta = ktime_to_ns(ktime_sub(now, data->entry_stamp));
	printk(KERN_INFO "%s returned %d and took %lld ns to execute\n",
			func_name, retval, (long long)delta);
	return 0;
}