From owner-cvs-all@FreeBSD.ORG Thu Dec 30 00:36:51 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F2E316A4CE; Thu, 30 Dec 2004 00:36:51 +0000 (GMT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id B70D943D2D; Thu, 30 Dec 2004 00:36:50 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from mail.chesapeake.net (localhost [127.0.0.1]) by mail.chesapeake.net (8.12.10/8.12.10) with ESMTP id iBU0aoGT093946; Wed, 29 Dec 2004 19:36:50 -0500 (EST) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost)iBU0anrE093942; Wed, 29 Dec 2004 19:36:49 -0500 (EST) (envelope-from jroberson@chesapeake.net) X-Authentication-Warning: mail.chesapeake.net: jroberson owned process doing -bs Date: Wed, 29 Dec 2004 19:36:49 -0500 (EST) From: Jeff Roberson To: Nate Lawson In-Reply-To: <41D33C50.6090109@root.org> Message-ID: <20041229193531.M60504@mail.chesapeake.net> References: <200412260013.iBQ0DcJ1074546@repoman.freebsd.org> <20041229020531.GA12575@dragon.nuxi.com> <41D26CE3.4070404@root.org> <20041229124826.Q60504@mail.chesapeake.net> <41D30245.8020600@root.org> <20041229151758.S60504@mail.chesapeake.net> <41D33C50.6090109@root.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys ktr.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 00:36:51 -0000 On Wed, 29 Dec 2004, Nate Lawson wrote: > Jeff Roberson wrote: > > On Wed, 29 Dec 2004, Nate Lawson wrote: > >>Jeff Roberson wrote: > >> > >>>On Wed, 29 Dec 2004, Nate Lawson wrote: > >>> > >>>>Also, could someone please get us more KTR ids while they're at it? We > >>>>only have 2 left. > >>> > >>> > >>>I think we should make one or to KTR_LOCAL's or something like that. So > >>>you can have a define in your file for KTR_MYCODE 0, and when you want to > >>>debug it, define it to KTR_LOCAL. There are a bunch of KTR ids that are > >>>used for things that don't really need to be global that we could gc if we > >>>do that. > >> > >>Isn't there a way to dynamically allocate ids, like sysctl does for oid? > > > > They need to be static at compile time or they always produce massive > > bloat in the kernel. > > Right, I thought we did something like that for other subsystems. I'm > very fuzzy on the current best approach but in the past we used linker > sets to gather a class of data at link time (including mod load). If > the linker set was an id placeholder for a particular type of debug > data, the kernel could overwrite this with the actual runtime id. We already have a runtime mechanism for disabling a particular class that could tolerate dynamic class ids. That's KTR_MASK. The issue I'm talking about, is the ability to compile it out. Since gcc's dead code eliminator doesn't run after link time, all ktrs would forever be compiled into the kernel. > > -- > Nate >