|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 04/12] x86/hvm: Reduce stack usage from HVMTRACE_ND()
On 20.09.2021 19:25, Andrew Cooper wrote:
> v2:
> * Adjust callers of HVMTRACE_ND() too
What does this refer to? The sole difference to v1 that I can spot
is ...
> * Drop _d[] for the 0 case.
... the one corresponding to this line, i.e. ...
> --- a/xen/include/asm-x86/hvm/trace.h
> +++ b/xen/include/asm-x86/hvm/trace.h
> @@ -67,38 +67,30 @@
> #define TRACE_2_LONG_4D(_e, d1, d2, d3, d4, ...) \
> TRACE_6D(_e, d1, d2, d3, d4)
>
> -#define HVMTRACE_ND(evt, modifier, cycles, count, d1, d2, d3, d4, d5, d6) \
> +#define HVMTRACE_ND(evt, modifier, cycles, ...) \
> do { \
> if ( unlikely(tb_init_done) && DO_TRC_HVM_ ## evt ) \
> { \
> - struct { \
> - u32 d[6]; \
> - } _d; \
> - _d.d[0]=(d1); \
> - _d.d[1]=(d2); \
> - _d.d[2]=(d3); \
> - _d.d[3]=(d4); \
> - _d.d[4]=(d5); \
> - _d.d[5]=(d6); \
> + uint32_t _d[] = { __VA_ARGS__ }; \
> __trace_var(TRC_HVM_ ## evt | (modifier), cycles, \
> - sizeof(*_d.d) * count, &_d); \
> + sizeof(_d), sizeof(_d) ? _d : NULL); \
... the addition of a conditional operator here (which I assume was
something a particular compiler didn't like in v1). FAOD - I'm fine
with the change, but I fear I'm overlooking something (again).
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |