[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kern/thread.c (stack_alloc_hits, stack_alloc_misses): Remove unused
From: |
Samuel Thibault |
Subject: |
Re: kern/thread.c (stack_alloc_hits, stack_alloc_misses): Remove unused variables |
Date: |
Thu, 30 May 2013 00:11:05 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Miguel Figueiredo, le Mon 27 May 2013 23:30:17 +0100, a écrit :
> in case you feel it is worth it:
I'm balanced. It is small enough not to have to really care about
performance, and stuffing #if makes the code less readable.
> diff --git a/kern/thread.c b/kern/thread.c
> index 79f526a..574f184 100644
> --- a/kern/thread.c
> +++ b/kern/thread.c
> @@ -163,10 +163,14 @@ boolean_t stack_alloc_try(
>
> if (stack != 0) {
> stack_attach(thread, stack, resume);
> +#if MACH_DEBUG
> stack_alloc_hits++;
> +#endif /* MACH_DEBUG */
> return TRUE;
> } else {
> +#if MACH_DEBUG
> stack_alloc_misses++;
> +#endif /* MACH_DEBUG */
> return FALSE;
> }
> }