[DTrace-devel] [PATCH 10/12] cg: make bpf_ldst_size() available outside dt_cg.c
Eugene Loh
eugene.loh at oracle.com
Sat Jan 6 06:11:35 UTC 2024
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
Does the dt_cg.h Copyright year need to be touched?
Also (I have no strong feelings on this one) isn't it weird to have one
function in dt_cg.h that isn't prefixed dt_cg_?
On 1/5/24 00:31, Kris Van Hees via DTrace-devel wrote:
> Some provider trampoline generation code needs this.
I'd be fine dropping that sentence. It doesn't seem to add much.
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
> ---
> libdtrace/dt_cg.c | 2 +-
> libdtrace/dt_cg.h | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libdtrace/dt_cg.c b/libdtrace/dt_cg.c
> index 06565616..8ade1eb1 100644
> --- a/libdtrace/dt_cg.c
> +++ b/libdtrace/dt_cg.c
> @@ -52,7 +52,7 @@ static void dt_cg_check_notnull(dt_irlist_t *dlp, dt_regset_t *drp, int reg);
> * does not map to a valid BPF instruction size specifier, an internal error is
> * reported.
> */
> -static uint_t
> +uint_t
> bpf_ldst_size(ssize_t size, int store)
> {
> switch (size) {
> diff --git a/libdtrace/dt_cg.h b/libdtrace/dt_cg.h
> index eb02bc93..3d0f3618 100644
> --- a/libdtrace/dt_cg.h
> +++ b/libdtrace/dt_cg.h
> @@ -42,6 +42,7 @@ extern int dt_cg_ctf_offsetof(const char *structname, const char *membername,
> size_t *sizep, int relaxed);
> extern uint_t dt_cg_ldsize(dt_node_t *dnp, ctf_file_t *ctfp, ctf_id_t type,
> ssize_t *ret_size);
> +extern uint_t bpf_ldst_size(ssize_t size, int store);
>
> #ifdef __cplusplus
> }
More information about the DTrace-devel
mailing list