[DTrace-devel] [PATCH 5/6 v3] Implement associative array support
Eugene Loh
eugene.loh at oracle.com
Fri Mar 11 22:32:16 UTC 2022
One other tiny thing...
On 3/11/22 11:19 AM, Kris Van Hees via DTrace-devel wrote:
> v4 in the works due to a issue with register spilling
>
> On Fri, Mar 11, 2022 at 01:26:30AM -0500, Kris Van Hees via DTrace-devel wrote:
>> Associative arrays (global or TLS) are variables that are indexed with
>> a tuple (one or more values). The underlying storage is provided by
>> the dvar (dynamic variables) BPF hash map. Since dvar elements are
>> indexed using a unique 64-bit ID, and given that it provides storage
>> for both regular TLS variables and associate array elements, the
>> algorithms to calculate the ID are designed to provide orthogonal
>> value ranges.
>>
>> diff --git a/libdtrace/dt_cg.c b/libdtrace/dt_cg.c
>> +static void
>> +dt_cg_arglist(dt_ident_t *idp, dt_node_t *args, dt_irlist_t *dlp,
>> + dt_regset_t *drp)
>> +{
>> + dtrace_hdl_t *dtp = yypcb->pcb_hdl;
>> +
>> + [...]
>> +
>> + for (dnp = args, i = 0; dnp != NULL; dnp = dnp->dn_list, i++) {
>> + dtrace_diftype_t t;
>> + size_t size;
>> +
>> + dt_node_diftype(yypcb->pcb_hdl, dnp, &t);
>> + size = t.dtdt_size;
Might as well s/yypcb->pcb_hdl/dtp/.
More information about the DTrace-devel
mailing list