[DTrace-devel] [PATCH 4/6 v2] Add macro to access stack slots past the register spill area
Eugene Loh
eugene.loh at oracle.com
Fri Mar 11 23:16:08 UTC 2022
Encore:
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
with two tiny things:
On 3/11/22 1:26 AM, Kris Van Hees via DTrace-devel wrote:
> The DT_TRAMP_SP9n) macro has been renamed to DT_TRAMP_SP_SLOT(n) for
s/9n)/(n)/
> consistency with the new DT_STK_SP_SLOT(n) macro. DT_STK_SP is new
> and refers to the location of a "stack pointer" that holds the address
> of a DT_STK_SP_SLOT.
>
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
> Reviewed-by: Eugene Loh <eugene.loh at oracle.com
> diff --git a/libdtrace/dt_dctx.h b/libdtrace/dt_dctx.h
> @@ -142,24 +142,29 @@ typedef struct dt_dctx {
> * -16, -24, -32, etc. -- that is, negative multiples of sizeof(uint64_t).
> *
> * +----------------+
> - * SCRATCH_BASE | Scratch Memory |
> - * +----------------+
> - * SPILL(n) | %r8 | (n = DT_STK_NREGS - 1 = 8)
> - * +----------------+
> * | ... |
> * +----------------+
> - * SPILL(1) | %r1 |
> - * +----------------+
> - * SPILL_BASE = SPILL(0) | %r0 |
> + * SP_BASE = SP_SLOT(0) | |<--+
> + * +----------------+ |
> + * SPILL(n) | %r8 | (n = DT_STK_NREGS - 1 = 8)
> + * +----------------+ |
> + * | ... | |
> + * +----------------+ |
> + * SPILL(1) | %r1 | |
> + * +----------------+ |
> + * SPILL_BASE = SPILL(0) | %r0 | |
> + * +----------------+ |
> + * SP | +------------+ (initial value)
Instead of +------ for the tail of the arrow, how about >>>-----, which
is more suggestive of the fletchings of an arrow. Having the tail
marked with a '+' is confusing since that char means something else in
this diagram.
> * +----------------+
> * DCTX | Ptr to dctx |
> * +----------------+
> */
More information about the DTrace-devel
mailing list