Subject: Re: CVS commit: src/sys
To: David Laight <dsl@netbsd.org>
From: Andrew Doran <ad@netbsd.org>
List: source-changes
Date: 08/29/2007 01:46:02
Hi,

On Mon, Aug 27, 2007 at 01:33:46PM +0000, David Laight wrote:
> 
> Module Name:	src
> Committed By:	dsl
> Date:		Mon Aug 27 13:33:46 UTC 2007
> 
> Modified Files:
> 	src/sys/kern: kern_ktrace.c kern_stub.c
> 	src/sys/sys: ktrace.h
> 
> Log Message:
> Fix inverted test in ktrpoint(), NAMI traces weren't being generated.
> Also inline the 'ktrace_on' part of the test.

Thanks for fixing this.

+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.

Thanks,
Andrew