[DTrace-devel] [PATCH 16/38] Move dt_probe_clause_t to be available outside of dt_probe.c

Kris Van Hees kris.van.hees at oracle.com
Thu Jul 18 20:19:55 UTC 2024


On Thu, Jun 27, 2024 at 01:34:33AM -0400, eugene.loh at oracle.com wrote:
> From: Eugene Loh <eugene.loh at oracle.com>

This certainly needs some motivation in the commit message, because it is not
at all clear why this is needed.  Sure, the next patch in the series uses it
outside of dtrace_probe, but that patch also does not provide any motivation
on why that is needed (and same with the patch after that).  So, these three
patches (16-18) should be combined, and bear a commit message that explains
why this is needed.  That will help in reviewing this code.

> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
> ---
>  libdtrace/dt_impl.h  | 5 +++++
>  libdtrace/dt_probe.c | 5 -----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/libdtrace/dt_impl.h b/libdtrace/dt_impl.h
> index d15c238c..2132eda2 100644
> --- a/libdtrace/dt_impl.h
> +++ b/libdtrace/dt_impl.h
> @@ -283,6 +283,11 @@ typedef struct dt_percpu_drops {
>  
>  typedef uint32_t dt_version_t;		/* encoded version (see below) */
>  
> +typedef struct dt_probe_clause {
> +	dt_list_t	list;
> +	dt_ident_t	*clause;
> +} dt_probe_clause_t;
> +
>  struct dtrace_hdl {
>  	const dtrace_vector_t *dt_vector; /* library vector, if vectored open */
>  	void *dt_varg;	/* vector argument, if vectored open */
> diff --git a/libdtrace/dt_probe.c b/libdtrace/dt_probe.c
> index 0b53121a..d0ae63d1 100644
> --- a/libdtrace/dt_probe.c
> +++ b/libdtrace/dt_probe.c
> @@ -24,11 +24,6 @@
>  #include <dt_list.h>
>  #include <dt_bpf.h>
>  
> -typedef struct dt_probe_clause {
> -	dt_list_t	list;
> -	dt_ident_t	*clause;
> -} dt_probe_clause_t;
> -
>  typedef struct dt_probe_dependent {
>  	dt_list_t	list;
>  	dt_probe_t	*probe;
> -- 
> 2.18.4
> 



More information about the DTrace-devel mailing list