[DTrace-devel] [PATCH 17/38] Add a provider-specific probe_add_clause handle
Kris Van Hees
kris.van.hees at oracle.com
Thu Jul 18 20:49:21 UTC 2024
See comments for 16/38
On Thu, Jun 27, 2024 at 01:34:34AM -0400, eugene.loh at oracle.com wrote:
> From: Eugene Loh <eugene.loh at oracle.com>
>
> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
> ---
> libdtrace/dt_probe.c | 2 ++
> libdtrace/dt_provider.h | 3 +++
> 2 files changed, 5 insertions(+)
>
> diff --git a/libdtrace/dt_probe.c b/libdtrace/dt_probe.c
> index d0ae63d1..48b02e11 100644
> --- a/libdtrace/dt_probe.c
> +++ b/libdtrace/dt_probe.c
> @@ -1354,6 +1354,8 @@ dt_probe_add_clause(dtrace_hdl_t *dtp, dt_probe_t *prp, dt_ident_t *idp)
> pcp->clause = idp;
>
> dt_list_append(&prp->clauses, pcp);
> + if (prp->prov->impl->probe_add_clause)
> + return prp->prov->impl->probe_add_clause(dtp, prp, idp);
>
> return 0;
> }
> diff --git a/libdtrace/dt_provider.h b/libdtrace/dt_provider.h
> index 17b1844c..b1b1b1b8 100644
> --- a/libdtrace/dt_provider.h
> +++ b/libdtrace/dt_provider.h
> @@ -62,6 +62,9 @@ typedef struct dt_provimpl {
> int (*probe_info)(dtrace_hdl_t *dtp, /* get probe info */
> const struct dt_probe *prp,
> int *argcp, dt_argdesc_t **argvp);
> + int (*probe_add_clause)(dtrace_hdl_t *dtp, /* add clause to probe */
> + struct dt_probe *prp,
> + dt_ident_t *idp);
> void (*detach)(dtrace_hdl_t *dtp, /* probe cleanup */
> const struct dt_probe *prb);
> void (*probe_destroy)(dtrace_hdl_t *dtp, /* free probe data */
> --
> 2.18.4
>
More information about the DTrace-devel
mailing list