Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys



Darran Hunt <darran%NetBSD.org@localhost> 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


Home | Main Index | Thread Index | Old Index