[DTrace-devel] [PATCH 04/15] cg: fix support for REF-types in dt_cg_store_val()
Nick Alcock
nick.alcock at oracle.com
Thu Feb 23 12:39:52 UTC 2023
On 23 Feb 2023, Kris Van Hees via DTrace-devel spake thusly:
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>
> diff --git a/libdtrace/dt_cg.c b/libdtrace/dt_cg.c
> index b72da90a..67e691ca 100644
> --- a/libdtrace/dt_cg.c
> +++ b/libdtrace/dt_cg.c
> @@ -1193,7 +1193,7 @@ dt_cg_store_val(dt_pcb_t *pcb, dt_node_t *dnp, dtrace_actkind_t kind,
> }
>
> /* Handle tracing of by-ref values (arrays, struct, union). */
> - if (kind == DTRACEACT_DIFEXPR && (arg & DT_NF_REF)) {
I do wonder why DIFEXPR was ever used here. I assumed it had a reason to
exist, but in hindsight...
> + if ((dnp->dn_flags & DT_NF_REF) || (arg & DT_NF_REF)) {
... this is obviously right.
I bet it's because dt_cg_act_trace says
if (dt_cg_store_val(pcb, arg, DTRACEACT_DIFEXPR, NULL, flags) == -1)
and that's the only caller that does that, and the comment even *says*
this is for tracing, so obviously something that worked for
dt_cg_act_trace and nothing else got stuffed in.
--
NULL && (void)
More information about the DTrace-devel
mailing list