From cd76999cd1cf590b95df3e22d2eb2a7dad333499 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Mon, 1 Dec 2014 16:16:04 +0100 Subject: kern: disable all counters by default Make all five non-conditional counters conditional ones. Casual checking revealed that the hits-to-miss ratio is excellent. * kern/counters.c: Make all counters conditional. * kern/counters.h: Likewise. * kern/ipc_sched.c: Likewise. * kern/sched_prim.c: Likewise. --- kern/sched_prim.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kern/sched_prim.c') diff --git a/kern/sched_prim.c b/kern/sched_prim.c index 66eb9c95..89fb1dc8 100644 --- a/kern/sched_prim.c +++ b/kern/sched_prim.c @@ -726,7 +726,7 @@ boolean_t thread_invoke( * running out of stack. */ - counter_always(c_thread_invoke_hits++); + counter(c_thread_invoke_hits++); (void) spl0(); call_continuation(new_thread->swap_func); /*NOTREACHED*/ @@ -738,7 +738,7 @@ boolean_t thread_invoke( */ thread_swapin(new_thread); thread_unlock(new_thread); - counter_always(c_thread_invoke_misses++); + counter(c_thread_invoke_misses++); return FALSE; case 0: @@ -759,7 +759,7 @@ boolean_t thread_invoke( { thread_swapin(new_thread); thread_unlock(new_thread); - counter_always(c_thread_invoke_misses++); + counter(c_thread_invoke_misses++); return FALSE; } } @@ -788,7 +788,7 @@ boolean_t thread_invoke( * changing address spaces. It updates active_threads. * It returns only if a continuation is not supplied. */ - counter_always(c_thread_invoke_csw++); + counter(c_thread_invoke_csw++); old_thread = switch_context(old_thread, continuation, new_thread); /* -- cgit v1.2.3