Re: [PATCH 4/4] trace-cruncher: Allow for detachable kprobes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 12 Jul 2021 15:32:42 +0300
"Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote:


> @@ -1617,8 +1622,9 @@ PyObject *PyFtrace_register_kretprobe(PyObject *self, PyObject *args,
>  		return NULL;
>  	}
>  
> -	if (!store_new_kprobe(event))
> -		return NULL;
> +	if (!detached)
> +		if (!store_new_kprobe(event))
> +			return NULL;

I wonder if it would be more consistent and helpful if we created a
structure for kprobes like we do for instances, and this way we can
save the "detached" field in that structure, and not free it on destroy.

This way, even though the kprobes are detached it may still be needed
in the future to list all kprobes that were created by the application,
regardless if they are detached or not.

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux