Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Mar 2010 07:47:00 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Alexander Leidinger <Alexander@leidinger.net>
Cc:        freebsd-stable@freebsd.org, Robert Watson <rwatson@freebsd.org>
Subject:   Re: is dtrace usable?
Message-ID:  <201003090747.00192.jhb@freebsd.org>
In-Reply-To: <20100309092709.16456y55vq0kaa88@webmail.leidinger.net>
References:  <E1Nnv0H-00020A-9M@kabab.cs.huji.ac.il> <201003081000.12656.jhb@freebsd.org> <20100309092709.16456y55vq0kaa88@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 09 March 2010 3:27:09 am Alexander Leidinger wrote:
> Quoting John Baldwin <jhb@freebsd.org> (from Mon, 8 Mar 2010 10:00:12 -05=
00):
>=20
> > On Saturday 06 March 2010 11:00:12 am Robert Watson wrote:
> >> On Sat, 6 Mar 2010, Alexander Leidinger wrote:
> >>
> >> >> Take a look at the DTrace configuration information here:
> >> >>
> >> >>    http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/dtrace=
=2Ehtml
> >> >
> >> > I've just reread it (despite the fact that I already used it). Some
> >> > comments:
> >> >
> >> > Last time I tried, I didn't see any problems by adding
> >> >  makeoptions     WITH_CTF=3Dyes
> >> > to the kernel config instead of doing
> >> >  make WITH_CTF=3D1 kernel
> >> >
> >> > Did I miss something, and if not, shouldn't we tell about the
> >> > makeoptions part instead (a kernel rebuild later will not cause
> >> > trouble when someone forgets to do the WITH_CTF part as it is already
> >> > in the kernel makefile)?
> >>
> >> I'll leave John to answer this one, CC line broadended.
> >
> > I would be very surprised if 'makeoptions WITH_CTF=3Dyes' worked.  The =
many
> > times I and others have tried it it did not work.  Do you have a log of=
 your
> > build showing the ctfconvert and ctfmerge command lines?
>=20
> I do not have a log around, it has been a while since I did something =20
> with dtrace (a year ago) and I can not remember that I always added =20
> WITH_CTF on a build (but it was about SDT probes, not FBT probes, in =20
> case it matters).
>=20
> I had a look again, WITH_CTF=3Dyes is one of the first lines in the =20
> Makefile, and /usr/share/mk/sys.mk has "if !defined(WITH_CTF)". "make =20
> -V WITH_CTF" shows "yes", but "make -V NO_CTF" shows "1". This is =20
> strange, isn't it? I would expect that NO_CTF is undefined. Is this a =20
> bug in make, or a bug in the man page (neither in the description of =20
> the different kinds of variables, nor in the description of "defined" =20
> is something mentioned explaining this behavior).

It is defined behavior.  From the 2nd and 3rd paragraphs of the make(1)
manual page:

     First of all, the initial list of specifications will be read from the
     system makefile, sys.mk, unless inhibited with the -r option.  The sta=
n-
     dard sys.mk as shipped with FreeBSD also handles make.conf(5), the
     default path to which can be altered via the make variable __MAKE_CONF.

     Then the first of BSDmakefile, makefile, and Makefile that can be found
     in the current directory, object directory (see .OBJDIR), or search pa=
th
     (see the -I option) will be read for the main list of dependency speci=
fi-
     cations.  A different makefile or list of them can be supplied via the=
 -f
     option(s).  Finally, if the file .depend can be found in any of the
     aforesaid locations, it will also be read (see mkdep(1)).

=46rom this you can see that sys.mk is included and parsed before 'Makefile=
',
so the WITH_CTF=3Dyes is not set until after sys.mk has been parsed.

=2D-=20
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003090747.00192.jhb>