From owner-freebsd-current@FreeBSD.ORG Sun Nov 16 20:15:06 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFA4016A52B for ; Sun, 16 Nov 2003 20:15:06 -0800 (PST) Received: from basement.kutulu.org (pcp03610121pcs.longhl01.md.comcast.net [68.49.239.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id A584043FCB for ; Sun, 16 Nov 2003 20:15:05 -0800 (PST) (envelope-from kutulu@kutulu.org) Received: from wombat.localnet (wombat.localnet [192.168.69.3]) by basement.kutulu.org (Postfix) with ESMTP id 7EC52AA40; Sun, 16 Nov 2003 23:15:04 -0500 (EST) Received: by wombat.localnet (Postfix, from userid 1001) id 0210DB855; Sun, 16 Nov 2003 23:14:23 -0500 (EST) Date: Sun, 16 Nov 2003 23:14:23 -0500 From: Michael Edenfield To: Harald Schmalzbauer Message-ID: <20031117041423.GA15294@wombat.localnet> Mail-Followup-To: Harald Schmalzbauer , current@freebsd.org References: <200311170243.18436@harrymail> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline In-Reply-To: <200311170243.18436@harrymail> X-Mailer: Mutt http://www.mutt.org/ X-Accept-Language: en X-PGP-Key: http://www.kutulu.org/pgp/kutulu.asc X-PGP-Fingerprint: 1CE0 3C31 7013 D529 406D 37DC 09CC CD84 A46C 878F User-Agent: Mutt/1.5.5.1i cc: current@freebsd.org Subject: Re: General debug/kernel question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2003 04:15:06 -0000 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Harald Schmalzbauer [031116 20:43]: Content-Description: signed data > Salve, >=20 > I always thought that building a kernel with debug symbols would increase= the=20 > kernel size dramatically. But if I understand things right the additioal= =20 > "symbols" (code snippets?) are not in the kernel but in a different file= =20 > which makes the kernel the same size like without debug=3D-g. Is there an= y=20 > reason to not build it with debug=3D-g? The debugging information doesn't appear in the installed kernel (/boot/kernel/kernel for example). The build process makes a kernel, with debug symbols, in /usr/obj/usr/src/sys/KERNCONF. It strips the debugging information out before installing the file, though, because it's pretty big. The downside to adding -g to the build is just that you take up more space in /usr which you may never use. > Also I thought debug kernels suffer from reduced performance. I also have= DDB=20 > in my kernel and don't _feel_ any difference. So again, is there any reas= on=20 > not to put DDB into the kernel? DDB itself probably will never affect your performance in a noticeable way unless your system crashed. The problem with DDB is that, if you're not present at the console when you get a kernel panic, the system hangs waiting for you. You can get around this by adding DDB_UNATTENDED, but IMO this is pretty much worthless for anyone who's not a kernel developer: you don't get to see the DDB screen and write down the backtrace, and you don't get a crash dump that you can extract with savecore. Unless you plan to actually do debugging live in your kernel I'd leave DDB off and set up a dump device instead. This lets you go back after a crash and extract information, by way of your debug kernel, at your leisure. The kernel debugging options that really kill performance are WITNESS and especially INVARIANTS. They cause a lot more debugging code to be compiled into the kernel that's normally cut out, and run lots of extra checks on locking and types and such at run-time. WITNESS also tends to procude excessive messages for potentially harmless problems. --Mike --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD4DBQE/uEsfCczNhKRsh48RAms7AJdFhlCGlpwUlt27amSwTf1iTqrWAJ4wj1Rc CZ41Wv9qNqSauvU/pDPqHA== =RZmv -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE--