Date: Wed, 10 Mar 2010 11:34:22 +0100 From: Alexander Leidinger <Alexander@Leidinger.net> To: "Robert N. M. Watson" <rwatson@freebsd.org> Cc: freebsd-stable@freebsd.org, John Baldwin <jhb@freebsd.org> Subject: Re: is dtrace usable? Message-ID: <20100310113422.95932h10tv1qh2o0@webmail.leidinger.net> In-Reply-To: <B83FA8F6-F29A-4C6F-8FCF-CBF48B27A18B@freebsd.org> References: <E1Nnv0H-00020A-9M@kabab.cs.huji.ac.il> <201003081000.12656.jhb@freebsd.org> <20100309092709.16456y55vq0kaa88@webmail.leidinger.net> <201003090747.00192.jhb@freebsd.org> <20100309151609.19673jkwuoptzy0w@webmail.leidinger.net> <B83FA8F6-F29A-4C6F-8FCF-CBF48B27A18B@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting "Robert N. M. Watson" <rwatson@freebsd.org> (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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100310113422.95932h10tv1qh2o0>