bug-hurd
[Top][All Lists]
Advanced

[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: Miguel Figueiredo
Subject: Re: kern/thread.c (stack_alloc_hits, stack_alloc_misses): Remove unused variables
Date: Mon, 27 May 2013 23:30:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130518 Icedove/17.0.5

Em 26-05-2013 22:39, Samuel Thibault escreveu:
Miguel Figueiredo, le Sun 26 May 2013 18:28:55 +0100, a écrit :
2013-05-26 Miguel Figueiredo <elmig@debianpt.org>

* kern/thread.c (stack_alloc_hits, stack_alloc_misses): Remove unused
variables

I wouldn't do that: they can be read from the debugger.

Samuel


in case you feel it is worth it:

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;
        }
 }

--
Melhores cumprimentos/Best regards,

Miguel Figueiredo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]