From owner-freebsd-arch Tue Oct 16 10:49:12 2001 Delivered-To: freebsd-arch@freebsd.org Received: from iguana.aciri.org (iguana.aciri.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id 7C1F437B403; Tue, 16 Oct 2001 10:49:10 -0700 (PDT) Received: (from rizzo@localhost) by iguana.aciri.org (8.11.3/8.11.1) id f9GHk1N64877; Tue, 16 Oct 2001 10:46:01 -0700 (PDT) (envelope-from rizzo) Date: Tue, 16 Oct 2001 10:46:01 -0700 From: Luigi Rizzo To: John Baldwin Cc: Luigi Rizzo , arch@FreeBSD.org Subject: Re: where to put support for timestamping kernel events ? Message-ID: <20011016104601.F63982@iguana.aciri.org> References: <20011016100520.E63982@iguana.aciri.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Oct 16, 2001 at 10:34:18AM -0700, John Baldwin wrote: > > > > what is KTR ? any pointers ? (sorry but i am not familiar > > with -current, where this seems to be...) > > KTR is an kernel event trace mechanism. current includes both ktr(4) and > ktr(9) manpages. It basically allows you to log events in a printf-style > fashion in the kernel including a timestamp among other things. i see. The thing i was suggesting is much more lightweight (and faster i presume). > >> Unfortunately, the KTR buffr isn't exported via sysctl(8) at the moment. > > > > well, the sysctl export is really trivial to do. > > Except on an SMP system when aother CPU may be sticking items in the buffer > while you are exporting it. isn't that true for all sysctl-exported items ? Actually, the problem i see for exporting the buffer is that in one of the modes (!KTR_EXTEND) it stores references to kernel addresses into the buffer, so you need a bit of in-kernel processing to make this info useful for userland (presumably using a SYSCTL_PROC thing to do this processing and return some significant info). Anyways -- it looks like the timestamping i was suggesting can be incorporated in ktr, and ktr-like things can be then MFC-ed to stable. Any objections to this ? cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message