From owner-freebsd-current@FreeBSD.ORG Thu Jun 14 19:53:15 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CC2F106566C for ; Thu, 14 Jun 2012 19:53:15 +0000 (UTC) (envelope-from rgoodfel@eecs.wsu.edu) Received: from mx0a-0007b301.pphosted.com (mx0a-0007b301.pphosted.com [67.231.144.34]) by mx1.freebsd.org (Postfix) with ESMTP id 475FC8FC12 for ; Thu, 14 Jun 2012 19:53:15 +0000 (UTC) Received: from pps.filterd (m0000529 [127.0.0.1]) by mx0a-0007b301.pphosted.com (8.14.4/8.14.4) with SMTP id q5EJo2x7015609 for ; Thu, 14 Jun 2012 12:53:09 -0700 Received: from zmail1.eecs.wsu.edu (zmail1.eecs.wsu.edu [69.166.54.48]) by mx0a-0007b301.pphosted.com with ESMTP id 15fh9nsue8-1 for ; Thu, 14 Jun 2012 12:53:08 -0700 Received: from guest-112.isi.edu (guest-112.isi.edu [206.117.31.112]) by zmail1.eecs.wsu.edu (Postfix) with ESMTPSA id 7AA1C66D272 for ; Thu, 14 Jun 2012 12:53:08 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1474\)) From: Ryan Goodfellow In-Reply-To: <5BD5B2B1-7165-4705-8750-50EEBB5E26F2@neville-neil.com> Date: Thu, 14 Jun 2012 12:53:07 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <5D6510D5-A8B3-41D9-B175-15FA680AF7F2@eecs.wsu.edu> <20120614115301.1cd0975b@fabiankeil.de> <5BD5B2B1-7165-4705-8750-50EEBB5E26F2@neville-neil.com> To: freebsd-current@freebsd.org X-Mailer: Apple Mail (2.1474) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855, 1.0.260, 0.0.0000 definitions=2012-06-14_06:2012-06-14, 2012-06-14, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1206140207 Subject: Re: DTrace broken on 9.0-Release? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 14 Jun 2012 19:53:15 -0000 Hi everyone, and thank you for the very prompt responses. I did indeed compile world with CFLAGS+=3D-fno-omit-frame-poiner in my = make.conf. I will file the PR shortly. Thank You Ryan G On Jun 14, 2012, at 9:00 AM, George Neville-Neil = wrote: > Top post. >=20 > File a PR and assign it to me (gnn) please. >=20 > I'm on vacation until Sunday but I am actively working on DTrace when = I'm not > on vacation. >=20 > Best, > Geo > On Jun 14, 2012, at 02:53 , Fabian Keil wrote: >=20 >> Ryan Goodfellow wrote: >>=20 >>> Today I downloaded and installed FreeBSD 9.0-RELEASE and followed = the >>> directions from to get DTrace up = and >>> running. The output of DTrace instrumenting a simple program, = however, >>> is not correct. The program is as follows: >>>=20 >>> // test.cc >>> #include >>>=20 >>> int main(void) { >>> for(int i =3D 0; i < 5; i++) { >>> malloc(47); >>> } >>> } >>>=20 >>> then compiling and running DTrace as follows: >>>=20 >>> g++ test.cc -o test >>>=20 >>> dtrace -n 'pid$target::malloc:entry{ }' -c ./test >>>=20 >>>=20 >>> The correct output for this example is something to the tune of: >>>=20 >>> dtrace: description 'pid$target::malloc:entry' matched 2 probes >>> dtrace: pid 95236 has exited >>> CPU ID FUNCTION:NAME >>> 0 188748 malloc:entry=20 >>> 0 188748 malloc:entry=20 >>> 0 188748 malloc:entry=20 >>> 0 188748 malloc:entry=20 >>> 0 188748 malloc:entry=20 >>>=20 >>> (this from a machine with the same code running DTrace) >>>=20 >>> The DTrace session should also make an immediate exit on completion. = On >>> FreeBSD I have the following CPU ID = FUNCTION:NAME >>> 2 42213 malloc:entry=20 >>>=20 >>> and the execution does either not exit on it's own or hangs, it = requires >>> a ctrl-c. >>=20 >> Doesn't work for me either on 10-CURRENT amd64. >> Converting it to C doesn't make a difference, it works if >> one changes the loop to "for (;;)", though. >>=20 >>> I followed the instructions from the FreeBSD site exactly, compiling = and >>> installing the custom kernel. I used both clang++ and g++ for >>> compilation with the same result. The system has even completely = hung >>> on other attempts. >>>=20 >>> Is DTrace not something that should be relied upon in FreeBSD? I = have >>> also tried this on the latest 10-CURRENT build with the same result. >>=20 >> In my opinion the problem with DTrace on FreeBSD is that while it's >> known to be incomplete, there doesn't seem to be documentation >> available about which parts are supposed to work already and which >> aren't. >>=20 >> For example the trivial example program at: >> http://wiki.freebsd.org/DTrace/userland (which works for me) doesn't >> actually use a counting loop, so maybe dtracing your example program >> isn't supposed to work yet and never did on FreeBSD. >>=20 >> Without documentation it's hard to tell. >>=20 >> Fabian >=20