[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 02/13] xen/spinlock: reduce lock profile ifdefs
On 24/11/2023 17:59, Alejandro Vallejo wrote: Hi,On 20/11/2023 11:38, Juergen Gross wrote:> With some small adjustments to the LOCK_PROFILE_* macros some #ifdefscan be dropped from spinlock.c. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- V2: - new patch V3: - add variable name to macros parameter (Jan Beulich) --- xen/common/spinlock.c | 49 +++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index d7194e518c..ce18fbdd8a 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -267,25 +267,28 @@ void spin_debug_disable(void)lock->profile->time_hold += NOW() - lock->profile->time_locked; \ lock->profile->lock_cnt++; \} -#define LOCK_PROFILE_VAR s_time_t block = 0 -#define LOCK_PROFILE_BLOCK block = block ? : NOW();-#define LOCK_PROFILE_GOT \+#define LOCK_PROFILE_VAR(var, val) s_time_t var = (val)+#define LOCK_PROFILE_BLOCK(var ) var = var ? : NOW()nit: spaces before the closing parenthesis Ugh, I'm changing email clients and formatting seems have gone haywire. The first line of each comment is inlined with the quote they refer to. Cheers, Alejandro
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |