Darran Hunt <dar...@netbsd.org> wrote:
> The new code is modular - it has its own kern_dtrace.c module.  I'm  
> not sure that replacing the #ifdefs with stub functions is the best  
> idea - won't that make the proc and lwp functions a bit less efficient  
> with calls to the empty functions?

Compiler will optimise them out.  We already do that in various places,
including threading and scheduling code.  Also:

+               if (dtrace_vtime_active) {
+                       (*dtrace_vtime_switch_func)(newl);
+               }

It is worth to give a separate cache line for dtrace_vtime_active and
use __predict_false().

P.S. It seems you forgot to commit kern_dtrace.c module. :)

-- 
Mindaugas

Reply via email to