Source-Changes archive

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

Re: CVS commit: src/sys



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@localhost



Home | Main Index | Thread Index | Old Index