Subject: Re: ktr from freebsd
To: Simon Burge <simonb@wasabisystems.com>
From: Andrey Petrov <petrov@netbsd.org>
List: tech-kern
Date: 04/23/2004 11:51:36
On Fri, Apr 23, 2004 at 12:43:17PM +1000, Simon Burge wrote:
>
> - Maybe the default KTR_TIME should be just the kernel time variable?
>
It's supposed to be cpu counter, just not there yet.
> - Adding a sysctl to return the trace buffer would be nice (remember
> 64-bit alignment so there's no compat32 issues - sparc64 is a good
> place to test this :-).
>
> - What did FreeBSD have in terms of "sysctl control"? A simple
> "enable/disable" tracing button would be nice.
>
FreeBSD has an ability to save trace to a file, so if kern_ktr will go
to tree I restore/port that part too. sysctl lets you to select
flow to capture (using mask), and to control over storing trace to file.
Getting trace by sysctl: information saved in trace point is pointer
to format string and six parameters, so easiest(and kernel image
independant) would be printing it and returning in string.
> - I'm a little concerned with uvmhist overlap. I'd guess we'd want
> one or the other in the kernel, not both.
>
Second that, FreeBSD
> - A style nit: there's quite a mix of "#define<space>" and
> "#define<tab>".
>
> I agree that a general tracing mechanism for use anywhere in the kernel
> is quite handy.
>
> Simon.
> --
> Simon Burge <simonb@wasabisystems.com>
> NetBSD Support and Service: http://www.wasabisystems.com/