[DTrace-devel] [PATCH 2/7] Make dt_cg_load() available to provider implementations
Eugene Loh
eugene.loh at oracle.com
Thu May 26 20:22:43 UTC 2022
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
But how about cleaning up the antiquated comments preceding
dt_cg_load(). After all, the sign and userland bits as well as the
3-bit and 5-bit stuff are all gone.
Actually, pulling patch #7/7 into here might make a lot of sense.
Also, it would make sense to rename dt_cg_load(). It's been a long time
since it returned a load opcode; it returns a ldst width. In any case,
it certainly does not load anything.
On 5/26/22 11:24, Kris Van Hees via DTrace-devel wrote:
> Code generation for probe program trampolines will need dt_cg_load()
> to generate the correct load instructions when populating the probe
> argument data.
>
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
> ---
> libdtrace/dt_cg.c | 2 +-
> libdtrace/dt_cg.h | 4 +++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/libdtrace/dt_cg.c b/libdtrace/dt_cg.c
> index 823fe8e3..a08fac89 100644
> --- a/libdtrace/dt_cg.c
> +++ b/libdtrace/dt_cg.c
> @@ -2077,7 +2077,7 @@ dt_cg_setx(dt_irlist_t *dlp, int reg, uint64_t x)
> * signed load from userland would be at the following table index:
> * user=1 sign=1 size=4 => binary index 11011 = decimal index 27
> */
> -static uint_t
> +uint_t
> dt_cg_load(dt_node_t *dnp, ctf_file_t *ctfp, ctf_id_t type, ssize_t *ret_size)
> {
> #if 1
> diff --git a/libdtrace/dt_cg.h b/libdtrace/dt_cg.h
> index 5752151b..fee851a6 100644
> --- a/libdtrace/dt_cg.h
> +++ b/libdtrace/dt_cg.h
> @@ -1,6 +1,6 @@
> /*
> * Oracle Linux DTrace.
> - * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
> * Licensed under the Universal Permissive License v 1.0 as shown at
> * http://oss.oracle.com/licenses/upl.
> */
> @@ -31,6 +31,8 @@ extern void dt_cg_tramp_return(dt_pcb_t *pcb);
> extern void dt_cg_tramp_epilogue(dt_pcb_t *pcb);
> extern void dt_cg_tramp_epilogue_advance(dt_pcb_t *pcb, dt_activity_t act);
> extern void dt_cg_tramp_error(dt_pcb_t *pcb);
> +extern uint_t dt_cg_load(dt_node_t *dnp, ctf_file_t *ctfp, ctf_id_t type,
> + ssize_t *ret_size);
>
> #ifdef __cplusplus
> }
More information about the DTrace-devel
mailing list