[DTrace-devel] [PATCH 05/10] Add disassembler annotations for register spills

Eugene Loh eugene.loh at oracle.com
Fri Mar 18 21:21:48 UTC 2022


Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
with

On 3/18/22 3:04 PM, Kris Van Hees via DTrace-devel wrote:
> diff --git a/libdtrace/dt_dis.c b/libdtrace/dt_dis.c
> @@ -252,6 +252,16 @@ dt_dis_load(const dtrace_difo_t *dp, const char *name, uint_t addr,
>   
> +#if 1
> +	if (in->code == (BPF_LDX | BPF_MEM | BPF_DW) &&
> +	    in->src_reg == BPF_REG_FP &&
> +	    in->off <= DT_STK_SPILL(0) &&
> +	    in->off >= DT_STK_SPILL(DT_STK_NREGS) &&
> +	    in->dst_reg == -(in->off - DT_STK_SPILL_BASE) / DT_STK_SLOT_SZ) {
> +		fprintf(fp, "%*s! restore %s\n", DT_DIS_PAD(n), "",
> +			reg(in->dst_reg));
> +	} else
> +#endif
>   	dt_dis_refname(dp, in, addr, n, fp);
Did you mean to get rid of the #if 1 and #endif?  And indent 
dt_dis_refname()?

Same for dt_dis_store().



More information about the DTrace-devel mailing list