[PATCH 14/22] Both dted_uarg and dofe_uarg are unused

eugene.loh
2024-08-29T05:22:53Z

From: Eugene Loh <eugene.loh@oracle.com>

I confirmed in a run of the test suite that they are unused.

But I do not understand how any of the dof_ecbdesc_t fields are
used: dofe_probes, dofe_actions, or dofe_pad.

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
include/dtrace/dof.h | 1 -
include/dtrace/enabling.h | 1 -
libdtrace/dt_dof.c | 1 -
3 files changed, 3 deletions(-)

diff --git a/include/dtrace/dof.h b/include/dtrace/dof.h
index f5655fe2..f9b66e10 100644
--- a/include/dtrace/dof.h
+++ b/include/dtrace/dof.h
@@ -94,7 +94,6 @@ typedef struct dof_ecbdesc {
dof_secidx_t dofe_probes; /* link to DOF_SECT_PROBEDESC */
dof_secidx_t dofe_actions; /* link to DOF_SECT_ACTDESC */
uint32_t dofe_pad; /* reserved for future use */
- uint64_t dofe_uarg; /* user-supplied library argument */
} dof_ecbdesc_t;

typedef struct dof_probedesc {
diff --git a/include/dtrace/enabling.h b/include/dtrace/enabling.h
index f1ec444c..55f67c03 100644
--- a/include/dtrace/enabling.h
+++ b/include/dtrace/enabling.h
@@ -53,7 +53,6 @@ typedef struct dtrace_actdesc {

typedef struct dtrace_ecbdesc {
dtrace_probedesc_t dted_probe; /* probe description */
- uint64_t dted_uarg; /* library argument */
int dted_refcnt; /* reference count */
} dtrace_ecbdesc_t;

diff --git a/libdtrace/dt_dof.c b/libdtrace/dt_dof.c
index be29f045..c89ad830 100644
--- a/libdtrace/dt_dof.c
+++ b/libdtrace/dt_dof.c
@@ -738,7 +738,6 @@ dtrace_dof_create(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, uint_t flags)
dofe.dofe_probes = probesec;
dofe.dofe_actions = actsec;
dofe.dofe_pad = 0;
- dofe.dofe_uarg = edp->dted_uarg;

dof_add_lsect(ddo, &dofe, DOF_SECT_ECBDESC,
sizeof(uint64_t), 0, 0, sizeof(dof_ecbdesc_t));
--
2.43.5