Skip to content

Commit

Permalink
Eliminate dtagd_id
Browse files Browse the repository at this point in the history
In the port to BPF, dtagd_varid and dtagd_id are identical.
The longer name better reflects the current meaning.

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
euloh authored and kvanhees committed Sep 6, 2022
1 parent 268d3e5 commit 1cfcd91
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion cmd/dtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@ bufhandler(const dtrace_bufdata_t *bufdata, void *arg)
BUFDUMPHDR(" dtrace_aggdesc");
BUFDUMPSTR(desc, dtagd_name);
BUFDUMP(desc, dtagd_varid);
BUFDUMP(desc, dtagd_id);
BUFDUMP(desc, dtagd_nkrecs); /* FIXME: +1 for varid */
BUFDUMPHDR("");
}
Expand Down
1 change: 0 additions & 1 deletion include/dtrace/metadesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ typedef struct dtrace_aggdesc {
DTRACE_PTR(char, dtagd_name); /* aggregation name */
dtrace_aggid_t dtagd_varid; /* aggregation varID */
int dtagd_flags; /* aggregation flags */
dtrace_aggid_t dtagd_id; /* aggregation ID */
uint64_t dtagd_sig; /* aggregation signature */
uint64_t dtagd_normal; /* aggregation normalization */
uint32_t dtagd_ksize; /* keys size in bytes */
Expand Down
3 changes: 1 addition & 2 deletions libdtrace/dt_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,10 @@ dt_aggid_add(dtrace_hdl_t *dtp, const dt_ident_t *aid)
*/
nkrecs = 1 + ((dt_idsig_t *)aid->di_data)->dis_argc;

agg->dtagd_id = id;
agg->dtagd_varid = id;
agg->dtagd_name = aid->di_name;
agg->dtagd_sig = ((dt_idsig_t *)aid->di_data)->dis_auxinfo;
agg->dtagd_normal = 1;
agg->dtagd_varid = aid->di_id;
agg->dtagd_keyidx = 1;
agg->dtagd_nkrecs = nkrecs;

Expand Down
2 changes: 1 addition & 1 deletion libdtrace/dt_printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,7 @@ dt_fprinta(const dtrace_aggdata_t *adp, void *arg)
dt_pfwalk_t *pfw = arg;
dtrace_hdl_t *dtp = pfw->pfw_argv->pfv_dtp;

if (pfw->pfw_aid != agg->dtagd_id)
if (pfw->pfw_aid != agg->dtagd_varid)
return 0; /* id does not match */

if (dt_printf_format(dtp, pfw->pfw_fp, pfw->pfw_argv, rec, nrecs,
Expand Down

0 comments on commit 1cfcd91

Please sign in to comment.