[DTrace-devel] [PATCH 3/6] Refactor get_tvar() into generic components
Eugene Loh
eugene.loh at oracle.com
Tue Mar 8 02:48:32 UTC 2022
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
though...
On 3/7/22 2:50 PM, Kris Van Hees via DTrace-devel wrote:
> diff --git a/bpf/get_tvar.c b/bpf/get_dvar.c
> @@ -29,6 +27,15 @@ noinline void *dt_get_tvar(uint32_t id, uint64_t store, uint64_t nval)
> key++;
> key = (key << 32) | id;
>
> + return key;
> +}
> +
> +noinline void *dt_get_dvar(uint64_t id, uint64_t store, uint64_t nval)
> +{
> + uint64_t key = id;
> + uint64_t dflt_key = 0;
> + void *val;
> +
> /*
> * If we are going to store a zero-value, it is a request to delete the
> * TLS variable.
The "id" in dt_get_dvar() is totally unnecessary -- after all, it is
eliminated in a different patch. Cleaner not to introduce it in the
first place.
More information about the DTrace-devel
mailing list