Date: Wed, 13 Jun 2012 23:32:56 -0700 From: Garrett Cooper <yanegomi@gmail.com> To: Ryan Goodfellow <rgoodfel@eecs.wsu.edu> Cc: freebsd-current@freebsd.org Subject: Re: DTrace broken on 9.0-Release? Message-ID: <CAGH67wTt4%2B6xuWTnk2ZHHtN-zZPz1ZRSCVki7_T=aYTKfM-BtA@mail.gmail.com> In-Reply-To: <5D6510D5-A8B3-41D9-B175-15FA680AF7F2@eecs.wsu.edu> References: <5D6510D5-A8B3-41D9-B175-15FA680AF7F2@eecs.wsu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 13, 2012 at 9:33 PM, Ryan Goodfellow <rgoodfel@eecs.wsu.edu> wr= ote: > Hi FreeBSD community, > > Today I downloaded and installed FreeBSD 9.0-RELEASE and followed the dir= ections from <http://wiki.freebsd.org/DTrace> to get DTrace up and running.= =A0The output of DTrace instrumenting a simple program, however, is not co= rrect. =A0The program is as follows: > > // test.cc > #include<cstdlib> > > int main(void) { > =A0for(int i =3D 0; i < 5; i++) { > =A0 =A0malloc(47); > =A0} > } > > then compiling and running DTrace as follows: > > g++ test.cc -o test > > dtrace -n 'pid$target::malloc:entry{ }' -c ./test > > > The correct output for this example is something to the tune of: > > dtrace: description 'pid$target::malloc:entry' matched 2 probes > dtrace: pid 95236 has exited > CPU =A0 =A0 ID =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0FUNCTION:NAME > =A00 188748 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 malloc:entry > =A00 188748 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 malloc:entry > =A00 188748 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 malloc:entry > =A00 188748 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 malloc:entry > =A00 188748 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 malloc:entry > > (this from a machine with the same code running DTrace) > > The DTrace session should also make an immediate exit on completion. On F= reeBSD I have the following > CPU =A0 =A0 ID =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0FUNCTION:NAME > =A02 =A0 =A0 =A042213 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 malloc:entr= y > > and the execution does either not exit on it's own or hangs, it requires = a ctrl-c. > > I followed the instructions from the FreeBSD site exactly, compiling and = installing the custom kernel. =A0I used both clang++ and g++ for compilatio= n with the same result. =A0The system has even completely hung on other att= empts. > > Is DTrace not something that should be relied upon in FreeBSD? =A0I have = also tried this on the latest 10-CURRENT build with the same result. Did you compile world with -fno-omit-frame-pointer ? I didn't doing that (at least) and I'm seeing the same things that you are seeing. Thanks, -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wTt4%2B6xuWTnk2ZHHtN-zZPz1ZRSCVki7_T=aYTKfM-BtA>