From owner-freebsd-current@FreeBSD.ORG Thu Jun 14 06:32:56 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 D35B81065702 for ; Thu, 14 Jun 2012 06:32:56 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 96F4F8FC1A for ; Thu, 14 Jun 2012 06:32:56 +0000 (UTC) Received: by obcni5 with SMTP id ni5so2520005obc.13 for ; Wed, 13 Jun 2012 23:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=i1zxW/ko0B8BF5I/TfOSfqxiTF5+QDEWEo/sGWC2kug=; b=vvWpR/DKDDhM1hSmYjjmNsi4GVxk9Fhllp1aZ9PVf9tmN8nDL27cysGNJMrlJ2gjj5 tBP+5WgxaT4YQ02o3W/Fn4wqRjtJxNEhPwYVhlmNzI0TuYLiZB/X/rVpAdumnwnYsUBF cqUgYUgRYxOP3n9dU6+refl8vbJL0DfOoMMReQBu7pfLvM3WeOtrw1LvVBAUDI5BjV7Z RfkLTIIisYzTJVO6gkCIrFHCtVqc12fU/9MyTJzZ1VgUvrLqjg6BkKecZWhZxd+B7KNn SMRrS/TgXKb1/GueMYpAQ4UgDfseu0PZJUpxoKGhyw5zztwQEl+knOv8WRv7GPRdG59m Hhtw== MIME-Version: 1.0 Received: by 10.182.40.5 with SMTP id t5mr462984obk.68.1339655576243; Wed, 13 Jun 2012 23:32:56 -0700 (PDT) Received: by 10.76.98.77 with HTTP; Wed, 13 Jun 2012 23:32:56 -0700 (PDT) In-Reply-To: <5D6510D5-A8B3-41D9-B175-15FA680AF7F2@eecs.wsu.edu> References: <5D6510D5-A8B3-41D9-B175-15FA680AF7F2@eecs.wsu.edu> Date: Wed, 13 Jun 2012 23:32:56 -0700 Message-ID: From: Garrett Cooper To: Ryan Goodfellow Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org 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 06:32:56 -0000 On Wed, Jun 13, 2012 at 9:33 PM, Ryan Goodfellow wr= ote: > Hi FreeBSD community, > > Today I downloaded and installed FreeBSD 9.0-RELEASE and followed the dir= ections from 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 > > 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