From owner-freebsd-arch@FreeBSD.ORG Wed Jun 5 21:50:47 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 74F8D423 for ; Wed, 5 Jun 2013 21:50:47 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pb0-x22c.google.com (mail-pb0-x22c.google.com [IPv6:2607:f8b0:400e:c01::22c]) by mx1.freebsd.org (Postfix) with ESMTP id 548EA1614 for ; Wed, 5 Jun 2013 21:50:47 +0000 (UTC) Received: by mail-pb0-f44.google.com with SMTP id wz12so2376835pbc.3 for ; Wed, 05 Jun 2013 14:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=cvhLmgidvY839o00IWLXQY5lHX+/Kl6Y7Bz1ZtrKcTM=; b=x/rRrMWnavrQf7Z+o1tAB5Gy7LYDh43J2L3XWfacMPZ01/xLpXHF5Spms30MrPxotq zR1++f5Ps1BBbDdzm3EUZ+QYBwf2NPwAWb+Ko6A+INKUYkO/To9nt3Zh7/dlFnby3dSR zD9+ArNBDlYHI8KZvveVn6qmFun+gT2x4TxKMOZWqjkTS1vFCeURYVRQoPIrYlrHoh3d w7Fktf9KXgl0A0txlggvkVW8MF/uFGS/bJs994qbhKr3x549uU50zj/EMCrfwt4EZGQx 6qqt8jIZLDfdEm3gnyScM9Mvir4Wy7awPvew4DAghbX64rVOAp3VuhG9nLTvFyANq3x1 1x0g== X-Received: by 10.66.122.130 with SMTP id ls2mr35612522pab.128.1370469047155; Wed, 05 Jun 2013 14:50:47 -0700 (PDT) Received: from [10.192.166.0] (stargate.chelsio.com. [67.207.112.58]) by mx.google.com with ESMTPSA id qh4sm74367820pac.8.2013.06.05.14.50.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Jun 2013 14:50:46 -0700 (PDT) Sender: Navdeep Parhar Message-ID: <51AFB2B3.5050105@FreeBSD.org> Date: Wed, 05 Jun 2013 14:50:43 -0700 From: Navdeep Parhar User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130522 Thunderbird/17.0.6 MIME-Version: 1.0 To: freebsd-arch@freebsd.org Subject: missing DTrace FBT return probes Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jun 2013 21:50:47 -0000 A large number of kernel functions have an FBT entry probe but no return probe. I believe this is due to tail call optimization by the compiler. Should we disable this optimization for kernel configs that have DTrace support? The missing return probes make it very difficult to write DTrace scripts that want to set flags etc. at function entry and then clean them up on return. A quick sample from a recent HEAD shows ~4000 out of ~27000 functions are missing return probes. See the list of functions in these files (the ones listed in entry-only.txt do not have return probes). http://people.freebsd.org/~np/entry-only.txt http://people.freebsd.org/~np/entry.txt http://people.freebsd.org/~np/return.txt Regards, Navdeep dtrace -ln fbt:::entry | sed -e 's/.* *\(.*\) entry$/\1/g' | sort > entry.txt dtrace -ln fbt:::return | sed -e 's/.* *\(.*\) return$/\1/g' | sort > return.txt comm -23 entry.txt return.txt > entry-only.txt