Subject: Re: CVS commit: src/sys
To: Andrew Doran <ad@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: source-changes
Date: 08/29/2007 20:57:08
On Wed, Aug 29, 2007 at 01:46:02AM +0100, Andrew Doran wrote:
> 
> +static inline bool
> +ktrpoint(int fac)
> +{
> +    return __predict_false(ktrace_on) && __predict_false(ktr_point(1 << fac));
> +}
> 
> I deliberately kept how the facility numbers are encoded internally out of
> view from compiled code (instead of '1 << fac' pass 'fac') so that we can
> change it at will later without breaking LKM compatibility.

I was thinking of the cost of the shift operation...
Plan 'A' inlined the entire test - but that exposed the contents of struct
proc.

Some comments might have been nice - it took me a while to actually work
out what the 'ktrace_on' variable was counting.

	David

-- 
David Laight: david@l8s.co.uk