From owner-freebsd-stable@FreeBSD.ORG Wed Mar 10 10:34:34 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66470106564A; Wed, 10 Mar 2010 10:34:34 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 04A3D8FC26; Wed, 10 Mar 2010 10:34:33 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2DEEF.dip.t-dialin.net [217.226.222.239]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id DB856844588; Wed, 10 Mar 2010 11:34:25 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id AE13C534B; Wed, 10 Mar 2010 11:34:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1268217262; bh=kZ4kDKDOxCSF6Dxp1KU/CpimnGA3mPs6rtk5z5XqVTc=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=zi2km/FjOrzOkNVAgNBosBwnYizunoy4WoZ1D/JF/GrjxmapXO7iCi5uJdZZCyVrj 4wZs+y2TNoBhhNcGjzrxIb9IBWp+LK8CUTN+5YN+2I7Au3u1/3KEqVyHITzYo9p135 azbHPjnLdPZoV9Hvdd/suH5AQn3G+JcpIZu57vYwj20w5Va203UAB/kgrU+bn2eglK PKLwZQdC2P44G1l6V7JudVVAbdBzllA8m9auVFWh5EjXE7aX0RhyhyhQEHSHTMzkmo fcI3yfZsosW0i4L2SVZLgixcT2CCmK9FR7aNmGyrNFuGW9Y01GK6nMJsOdcvji2hL+ YqqBt5ALnBVxA== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o2AAYM60063101; Wed, 10 Mar 2010 11:34:22 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 10 Mar 2010 11:34:22 +0100 Message-ID: <20100310113422.95932h10tv1qh2o0@webmail.leidinger.net> Date: Wed, 10 Mar 2010 11:34:22 +0100 From: Alexander Leidinger To: "Robert N. M. Watson" References: <201003081000.12656.jhb@freebsd.org> <20100309092709.16456y55vq0kaa88@webmail.leidinger.net> <201003090747.00192.jhb@freebsd.org> <20100309151609.19673jkwuoptzy0w@webmail.leidinger.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: DB856844588.3125A X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.84, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, J_CHICKENPOX_73 0.60) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1268822068.63472@Ea0IGgC/rhqwcBnRPhkvOw X-EBL-Spam-Status: No Cc: freebsd-stable@freebsd.org, John Baldwin Subject: Re: is dtrace usable? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2010 10:34:34 -0000 Quoting "Robert N. M. Watson" (from Tue, 9 Mar 2010 16:39:09 +0000): > > On Mar 9, 2010, at 2:16 PM, Alexander Leidinger wrote: > >>> From this you can see that sys.mk is included and parsed before 'Makefile', >>> so the WITH_CTF=yes is not set until after sys.mk has been parsed. >> >> I think we need to find a different solution for this. The need to >> specify WITH_CTF at the command line is very error prone. :( > > You are neither the first person to have made this observation, nor > the first person to have failed to propose a solution in the form of > a patch :-). It is not a problem to provide a patch, the problem is something else. Is it correct that the result of the ctfmerge/cftconvert stuff is not covered by the CDDL? If yes, why not use it by default if the programs are available (I've read the comment for the NO_CTF part, but IMO we have a chicken&egg situation here, dtrace will not become popular if it is not easy to use it)? This default can be made only for the kernel (by making a copy of the definition of CTFCONVERT into bsd.prog.mk and bsd.lib.mk, or by undefining it there), or for kernel+userland (removing the !WITH_CTF -> NO_CTF part from sys.mk). Theoretically I have a patch for that, but somehow I stumple over something strange which I don't understand. I have the following (/usr/share/mk and /usr/src/share/mk are the same): ---snip--- --- bsd.lib.mk (revision 204031) +++ bsd.lib.mk (working copy) @@ -36,6 +36,18 @@ .if defined(DEBUG_FLAGS) CFLAGS+= ${DEBUG_FLAGS} +# Turn CTF conversion off by default for now. This default could be +# changed later if DTrace becomes popular. +NO_CTF= 1 +.if defined(WITH_CTF) +.undef NO_CTF +.endif + +.if defined(NO_CTF) +.undef CTFCONVERT +.undef CTFMERGE +.endif + .if !defined(NO_CTF) && (${DEBUG_FLAGS:M-g} != "") CTFFLAGS+= -g .endif [some more stuff to make the CTFCONVERT/CTFMERGE stuff working] --- sys.mk (revision 204031) +++ sys.mk (working copy) @@ -46,12 +46,6 @@ .endif PO_CFLAGS ?= ${CFLAGS} -# Turn CTF conversion off by default for now. This default could be -# changed later if DTrace becomes popular. -.if !defined(WITH_CTF) -NO_CTF = 1 -.endif - # C Type Format data is required for DTrace CTFFLAGS ?= -L VERSION [some more stuff to make the CTFCONVERT/CTFMERGE stuff working] --- bsd.prog.mk (revision 204031) +++ bsd.prog.mk (working copy) @@ -19,6 +19,18 @@ CFLAGS+=${DEBUG_FLAGS} CXXFLAGS+=${DEBUG_FLAGS} +# Turn CTF conversion off by default for now. This default could be +# changed later if DTrace becomes popular. +NO_CTF= 1 +.if defined(WITH_CTF) +.undef NO_CTF +.endif + +.if defined(NO_CTF) +.undef CTFCONVERT +.undef CTFMERGE +.endif + .if !defined(NO_CTF) && (${DEBUG_FLAGS:M-g} != "") CTFFLAGS+= -g .endif [some more stuff to make the CTFCONVERT/CTFMERGE stuff working] ---snip--- When I go to /usr/src/bin/mv and run "make -V NO_CTF -V WITH_CTF" I only get empty output. I would expect to see NO_CTF set to 1. And when grepping for NO_CTF in /usr/share/mk I only see the undef of NO_CTF which I added myself in the above patch. Bye, Alexander. -- Life is just a bowl of cherries, but why do I always get the pits? http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137