From owner-freebsd-dtrace@freebsd.org Mon Feb 29 21:39:35 2016 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54A6DAB84B4 for ; Mon, 29 Feb 2016 21:39:35 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.strugglingcoder.info", Issuer "mail.strugglingcoder.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49DF21899; Mon, 29 Feb 2016 21:39:34 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id D1BF3110D91; Mon, 29 Feb 2016 13:39:33 -0800 (PST) Date: Mon, 29 Feb 2016 13:39:33 -0800 From: hiren panchasara To: freebsd-dtrace@freebsd.org Cc: sbruno@FreeBSD.org Subject: Functions not getting picked up by dtrace Message-ID: <20160229213933.GE82027@strugglingcoder.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LiQwW4YX+w4axhAx" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Feb 2016 21:39:35 -0000 --LiQwW4YX+w4axhAx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I've seen this earlier with others too but this one is the latest confusing me: em_xmit() in $src/dev/e1000/if_em.c Other functions with similar signature are listed in 'dtrace -l'. Is is because of some optimization? How do I undo it for testing purposes? Cheers, Hiren --LiQwW4YX+w4axhAx Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJW1LqSXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/l4YkH/3447rAsum76cUTN14PTXJb2 nK6qXyJBK9P53u8F6eypc9tCfBOGE4JJGsseQKIcJLjpaNQan5vRXq2hvaDEMSoL fcwictIuRsdhVitnE+VYIfkFFVB/wik58uzrTVHAOmLhTE8elOba6ReR3HaoYfBS qL2lqW49jpuUzvmugxHLXNGUBsUuyH7ldRXUopmy0zrdgx8952jgdogivjEoglzP S0/rk59nviOP1TxckJ0bGLXGt4kCICyYWIq/LJQY37gAmDSn/VnPsyMaX6Vx3/Q2 oNyKkyKcBxj2a3ReMTMhHH7/pXvanQ2lb4NlB6GbxcE86KEkFpNh73f9OfnWz34= =tPSc -----END PGP SIGNATURE----- --LiQwW4YX+w4axhAx-- From owner-freebsd-dtrace@freebsd.org Mon Feb 29 21:45:06 2016 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA0ECAB8904 for ; Mon, 29 Feb 2016 21:45:06 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DE181DC3 for ; Mon, 29 Feb 2016 21:45:06 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: by mail-wm0-x22d.google.com with SMTP id l68so8174454wml.1 for ; Mon, 29 Feb 2016 13:45:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=4DZZaNv7vhUdSK5nzft37TNYqsFHpUGI0WhHjYOL/U4=; b=MsjXIzAlvtv6BQrcxZxHz61WHlqKegsiOi5T3InJqhMgJjLnhVmCsFI6j1OOq8VCwS rvaUmnpV6g33mNyFdAK0I0mWCmBPJAiK5EL6/z5bHdh/VI+vraAO0XNMSg6jhCwRXLF8 Ltac2WgWxvw7O+pWShJNPxut1IQxc1ZQXm+kREqmDHbTSTSfRR7W5l92YsMLslhp5zGQ 27ObDR4FUo7N2/u0fDrAxZwO2WFVl2/6oqB6rHaRpZf7F/O7Nvs8OFcn5aNtTY4tGYyC E/p+QgU3ptxtDQTCLNUKzjrHhGyYhXulHnplqNaN7EuJneC+df1bc1BiOM0UOJfOlfht 1JJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=4DZZaNv7vhUdSK5nzft37TNYqsFHpUGI0WhHjYOL/U4=; b=XzEh5nMKd988wegS+5KF2Bh6EmpBm/uKK6quXy8wMlVzvjs61l0hKLdoVZYqalmDG1 D3eK5gceiKpOwHLm47Bc80jyXIXut9oeB8oBMlsocnErKFU3wYos69dDMzV3W+tUVBPK 12jawyOrAK8o6PvgLWeUb69eOX/ANKjXZ+TrMfv9TtdySUbqyS/7twvOM3n/5gu109Qv T1vn5/ZVS1n6hoN3BKTm2AtHzbMbelOJf66rtBpJQGL6QR260SwtTrtniqrK61igCEo6 +vfRxkoh3OqeRYqwrrRCFkq09DkJNKrH+RK7N24shWg4GhLjBDXytP5azRGv8FyEExTS QvhQ== X-Gm-Message-State: AD7BkJKErmgiCmLv6g3vrA5qbLLmy2VaijCAIAdxlUW1a/CIU9HWyPujYP58gc3kHddtpoMj X-Received: by 10.194.77.15 with SMTP id o15mr19476181wjw.41.1456782304190; Mon, 29 Feb 2016 13:45:04 -0800 (PST) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id et11sm27746276wjc.30.2016.02.29.13.45.03 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Feb 2016 13:45:03 -0800 (PST) Subject: Re: Functions not getting picked up by dtrace To: freebsd-dtrace@freebsd.org References: <20160229213933.GE82027@strugglingcoder.info> From: Steven Hartland Message-ID: <56D4BBEC.6070502@multiplay.co.uk> Date: Mon, 29 Feb 2016 21:45:16 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160229213933.GE82027@strugglingcoder.info> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Feb 2016 21:45:07 -0000 Yes it is, __noinline is your friend, but it obviously has the associated penalty. On 29/02/2016 21:39, hiren panchasara wrote: > I've seen this earlier with others too but this one is the latest > confusing me: em_xmit() in $src/dev/e1000/if_em.c > > Other functions with similar signature are listed in 'dtrace -l'. > > Is is because of some optimization? How do I undo it for testing > purposes? > > Cheers, > Hiren From owner-freebsd-dtrace@freebsd.org Mon Feb 29 21:46:11 2016 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 528BEAB89AC for ; Mon, 29 Feb 2016 21:46:11 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26AF41EB1; Mon, 29 Feb 2016 21:46:11 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pa0-x22b.google.com with SMTP id fl4so98793946pad.0; Mon, 29 Feb 2016 13:46:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/cl5l1WYVlk7QlIJWU4nwYYJMX4QUp4nHAPfvqAaJu8=; b=OWAoLvFtKspG5HaS7LvHv6yTcQa13q5TzW1j4SJwpiwrtW5U5ZBTq5rHg12kgGxkWn HNW4BpdtdppYioEXwK0Px6T9NZTFMavs2LfnJffyz0p1nt2CMtAx69ioJesfzXlWCiye UAwpmQoynzVWfdi0XQSED/tjuzJmYHFDE0S5cwSVGVv96oc5ky461yrgxc9cqaMeXaQs HkgocDLypU2BaYkmIFMp55ja8GrqyRsLynFf2zX9yK638NTl67sgg+HT3g2+ZWAWh4jO PzV1yLw00lQNJe0+j+Hg22PmTlgf3gHlOqS+hDjH7XIBwn5qS0v1PSKMbAnN7D2jXjHL y3XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=/cl5l1WYVlk7QlIJWU4nwYYJMX4QUp4nHAPfvqAaJu8=; b=TNkMMGQzDBRrh+2mMngpg87N4Ge7QFmvSNRIR8d5wd1pPUD4jMvCRfLvs1WB75sW8q Vz9J/xdqHdFtuboiuqqV01n/8IntPbCx1zqNCifLoixdG8k3FkVz/xDqoT2R6G1SK8Zm vq6wcHWqHnUlcdeYv7/5gwoLVZc7Xk7YYx7fG5q9w/t6gxFJkFUUEG8JPWumDWQBr3Uh LA5VBhSJV303YXYCTGSN64cJ264qmSJOBR8RnCzE2tEdAfWBQZPKLfFjrmUN6qDVLto5 fEAQKAPtZI3IJT/QV2BcZunvH3WKPfvYo0xEivKJ4ryceaLTWV9UuS4skGi2H/NJz+kp jYmw== X-Gm-Message-State: AD7BkJKk6UxxcaaeVoCi0lnL1NCjkWgrhIWYeIKWVum1DX1wnTspFYl9w4e2HBTGRJaFeg== X-Received: by 10.66.102.104 with SMTP id fn8mr25217680pab.129.1456782370653; Mon, 29 Feb 2016 13:46:10 -0800 (PST) Received: from wkstn-mjohnston.west.isilon.com (c-67-182-131-225.hsd1.wa.comcast.net. [67.182.131.225]) by smtp.gmail.com with ESMTPSA id v3sm9632820par.17.2016.02.29.13.46.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Feb 2016 13:46:10 -0800 (PST) Sender: Mark Johnston Date: Mon, 29 Feb 2016 13:49:10 -0800 From: Mark Johnston To: hiren panchasara Cc: freebsd-dtrace@freebsd.org, sbruno@FreeBSD.org Subject: Re: Functions not getting picked up by dtrace Message-ID: <20160229214910.GA67805@wkstn-mjohnston.west.isilon.com> References: <20160229213933.GE82027@strugglingcoder.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160229213933.GE82027@strugglingcoder.info> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Feb 2016 21:46:11 -0000 On Mon, Feb 29, 2016 at 01:39:33PM -0800, hiren panchasara wrote: > I've seen this earlier with others too but this one is the latest > confusing me: em_xmit() in $src/dev/e1000/if_em.c > > Other functions with similar signature are listed in 'dtrace -l'. em_xmit() is a static function with a single call site, so it's getting inlined into its caller. DTrace FBT can't instrument inlined functions. > > Is is because of some optimization? How do I undo it for testing > purposes? There's a __noinline attribute that you can use for this. From owner-freebsd-dtrace@freebsd.org Mon Feb 29 21:46:56 2016 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 539E5AB8A01 for ; Mon, 29 Feb 2016 21:46:56 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from smtp.hungerhost.com (smtp.hungerhost.com [216.38.51.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31C001EE6; Mon, 29 Feb 2016 21:46:56 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mobile-107-107-56-114.mycingular.net ([107.107.56.114]:9507 helo=[172.20.10.2]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.86) (envelope-from ) id 1aaVeN-0002eR-QG; Mon, 29 Feb 2016 16:46:43 -0500 From: "George Neville-Neil" To: "hiren panchasara" Cc: freebsd-dtrace@freebsd.org, sbruno@FreeBSD.org Subject: Re: Functions not getting picked up by dtrace Date: Mon, 29 Feb 2016 16:46:39 -0500 Message-ID: <416C8E5D-AE79-4D62-8DE9-ED277E942F5C@neville-neil.com> In-Reply-To: <20160229213933.GE82027@strugglingcoder.info> References: <20160229213933.GE82027@strugglingcoder.info> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_CA4D5EDB-6773-4675-B7DB-A93BB1C07BA8_="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Mailer: MailMate (1.9.4r5226) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-Authenticated-Sender: vps.hungerhost.com: gnn@neville-neil.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Feb 2016 21:46:56 -0000 This is an OpenPGP/MIME signed message (RFC 3156 and 4880). --=_MailMate_CA4D5EDB-6773-4675-B7DB-A93BB1C07BA8_= Content-Type: text/plain On 29 Feb 2016, at 16:39, hiren panchasara wrote: > I've seen this earlier with others too but this one is the latest > confusing me: em_xmit() in $src/dev/e1000/if_em.c > > Other functions with similar signature are listed in 'dtrace -l'. > > Is is because of some optimization? How do I undo it for testing > purposes? > > Cheers, > Hiren static int em_xmit(struct tx_ring *txr, struct mbuf **m_headp) Remove "static" and rebuild. Best, George --=_MailMate_CA4D5EDB-6773-4675-B7DB-A93BB1C07BA8_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlbUvEAACgkQYdh2wUQKM9JVUgCgtAY0sPH8ZoPZJmcFiSgY3QRI RfYAn1A6Vrrvl7J2IX6sxotoSNZ1qrQf =O0M6 -----END PGP SIGNATURE----- --=_MailMate_CA4D5EDB-6773-4675-B7DB-A93BB1C07BA8_=-- From owner-freebsd-dtrace@freebsd.org Mon Feb 29 21:49:23 2016 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E04FFAB8AD9 for ; Mon, 29 Feb 2016 21:49:23 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.strugglingcoder.info", Issuer "mail.strugglingcoder.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D31461F85; Mon, 29 Feb 2016 21:49:23 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 0CB56110E72; Mon, 29 Feb 2016 13:49:23 -0800 (PST) Date: Mon, 29 Feb 2016 13:49:23 -0800 From: hiren panchasara To: Mark Johnston Cc: freebsd-dtrace@freebsd.org, sbruno@FreeBSD.org Subject: Re: Functions not getting picked up by dtrace Message-ID: <20160229214923.GF82027@strugglingcoder.info> References: <20160229213933.GE82027@strugglingcoder.info> <20160229214910.GA67805@wkstn-mjohnston.west.isilon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VaKJWhUROU/xPxjb" Content-Disposition: inline In-Reply-To: <20160229214910.GA67805@wkstn-mjohnston.west.isilon.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Feb 2016 21:49:24 -0000 --VaKJWhUROU/xPxjb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 02/29/16 at 01:49P, Mark Johnston wrote: > On Mon, Feb 29, 2016 at 01:39:33PM -0800, hiren panchasara wrote: > > I've seen this earlier with others too but this one is the latest > > confusing me: em_xmit() in $src/dev/e1000/if_em.c > >=20 > > Other functions with similar signature are listed in 'dtrace -l'. >=20 > em_xmit() is a static function with a single call site, so it's getting > inlined into its caller. DTrace FBT can't instrument inlined functions. >=20 > >=20 > > Is is because of some optimization? How do I undo it for testing > > purposes? >=20 > There's a __noinline attribute that you can use for this. Thanks, Mark. cem on irc also explained the "why" part. Cheers, Hiren --VaKJWhUROU/xPxjb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJW1LziXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lULAH/RqTBf9dXngpXEWKclMu3OGI TBpnuJxNgOgPvA8svMedcjpYGA8iEopiZR7cETV/+4zht5iDtRIiNblyC9zqofrW TGt11pcbtF3BCjlWKyp2n7l2uILaC2ZhYg+mQr9eZp7/fweBvoVu+OKM4n6vPP3M 5qbZcCggGuYxiIZ+/w8h0nd29axOIHKXHojpAOLGC8Ri0iP0UM6pWI8nR/kZBPuc vcbn193jLSZ8HctNKHDnsyWrlXrDf1yzd11IShFp97hn9PkGA3UThdqByiwKOvSM Be9Q3mCxOFCUv2Yw0C0B/YLya2R/VmZloMAOVXnCzPOT7UHdLTsGCvmiAs13n5E= =/8zb -----END PGP SIGNATURE----- --VaKJWhUROU/xPxjb-- From owner-freebsd-dtrace@freebsd.org Mon Feb 29 22:07:46 2016 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B987BAB9192 for ; Mon, 29 Feb 2016 22:07:46 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.strugglingcoder.info", Issuer "mail.strugglingcoder.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AC55D9AB; Mon, 29 Feb 2016 22:07:46 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 621DC110F49; Mon, 29 Feb 2016 14:07:45 -0800 (PST) Date: Mon, 29 Feb 2016 14:07:45 -0800 From: hiren panchasara To: Mark Johnston Cc: sbruno@FreeBSD.org, freebsd-dtrace@freebsd.org Subject: Re: Functions not getting picked up by dtrace Message-ID: <20160229220745.GG82027@strugglingcoder.info> References: <20160229213933.GE82027@strugglingcoder.info> <20160229214910.GA67805@wkstn-mjohnston.west.isilon.com> <20160229214923.GF82027@strugglingcoder.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QxN5xOWGsmh5a4wb" Content-Disposition: inline In-Reply-To: <20160229214923.GF82027@strugglingcoder.info> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Feb 2016 22:07:46 -0000 --QxN5xOWGsmh5a4wb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 02/29/16 at 01:49P, hiren panchasara wrote: > On 02/29/16 at 01:49P, Mark Johnston wrote: > > On Mon, Feb 29, 2016 at 01:39:33PM -0800, hiren panchasara wrote: > > > I've seen this earlier with others too but this one is the latest > > > confusing me: em_xmit() in $src/dev/e1000/if_em.c > > >=20 > > > Other functions with similar signature are listed in 'dtrace -l'. > >=20 > > em_xmit() is a static function with a single call site, so it's getting > > inlined into its caller. DTrace FBT can't instrument inlined functions. > >=20 > > >=20 > > > Is is because of some optimization? How do I undo it for testing > > > purposes? > >=20 > > There's a __noinline attribute that you can use for this. >=20 > Thanks, Mark. >=20 > cem on irc also explained the "why" part. Davide pointed out that it _might_ be possible that compiler change the way it decides what to inline and non-static functions can also get hidden that way from dtrace. In any case, the sure way seems to add __noinline. Cheers, Hiren --QxN5xOWGsmh5a4wb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJW1MEuXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lfYQH/2NZ3jI8quZQd/q2r2jeLMU6 ASxcQVG1h1CCuYTutfFMMy/HupXsjfDKiLIjstQ/L5Lfdi/WRwFo6tFZHGoRMYEY Gvan1zC6N7/XFS1chwquFZBeRhWupNu5Ah578aie8fvoXdz6UEkLjzSJ1u/prsyR gNN70wcJ6hpMFZR8QNcmLbo7QIPGDLrJtE64fe3ZpcK6skCxpoxVccvdRhWS8wEp SlS4KUObO7pPkqduAGaQF2LeiYk+XMc2eLxlhFrSDduSLXhxTBqkbGcwbTW/XVx5 t7FvJn6PzgB+vtM7M/+Y12r7Tvckrp6J6CRshhBUkUF4V7iLCt5p7A68g2q0bfw= =oLDn -----END PGP SIGNATURE----- --QxN5xOWGsmh5a4wb-- From owner-freebsd-dtrace@freebsd.org Mon Feb 29 22:17:04 2016 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55F03AB9470 for ; Mon, 29 Feb 2016 22:17:04 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x230.google.com (mail-pf0-x230.google.com [IPv6:2607:f8b0:400e:c00::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 298E3DA5; Mon, 29 Feb 2016 22:17:04 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x230.google.com with SMTP id 124so37958410pfg.0; Mon, 29 Feb 2016 14:17:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GbAuCUAPosDcqHw11L6E0C3x8Jtft2hZiS9VrrScmpc=; b=nz386pCotp8NewXPBY0Pq1xLQcQ8MAbSBgVdvlqmSgEmQDnf8XNNpeIOn5xFbi/+Fd 8PiMe+7lhA6RsrsO6VxSZGLcYE5k+R4sCgsySspF+03EvE/4DJ8x0XKI05Z7SsNQ4TWa PAhatuXAvTwkm1D1HXASKb9kVBNmR4VZYa6/LKR3Cy0P+OJbsrFiOW4yvSfXFaVx4ilJ qOV4TL5Q8aHhBtcXbLk34SMbm293hKTo9YkuV9oBJZfbZkNu04psxXyqbeuAhRxD/VxG j8X1gfsxMAtCQimlfxIx8gfaq9roTAAIe+Qtn0B/lw+OYvLbR27aHG13DlNIIjI8oSmj Sl3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=GbAuCUAPosDcqHw11L6E0C3x8Jtft2hZiS9VrrScmpc=; b=jY7NVWNqaV2aOnLjathexd8M/UYyBvCjZ41PfocJFx3qHQj8ivu+E3W+jR8vJMrXP0 O8E9+UzFHe/TvEWn7n9ezRGCKUbY3WpCFqGRjDFaUyKrRfRoBR2xNSx2lpNTO70JNSaA DFkqZsmxqNQiF3Z/Bv9CHvyvdbD0Ky/voPWOsutWob+N3RbVat44HXnT1fX2aDlFaEDz u/ZkliIYE5D7CpB3tPgQRu8HtPgWB/L5HONYvron8OD69RGc7RW0ENbxC6YzhWBn++kl OjhmbsLET299w/T2e1Zperu603dKyKazF1AErUgteyMzAPmj4rDesjAkiolD8vV8CWtM eAQg== X-Gm-Message-State: AD7BkJLPbkyYrn1uJDBh5I9i+wC5HS4Kbr71UGUnOTq3kMJ0T1nTRGp1Ib+rUJCANwMW8A== X-Received: by 10.98.64.132 with SMTP id f4mr25000586pfd.159.1456784223800; Mon, 29 Feb 2016 14:17:03 -0800 (PST) Received: from wkstn-mjohnston.west.isilon.com (c-67-182-131-225.hsd1.wa.comcast.net. [67.182.131.225]) by smtp.gmail.com with ESMTPSA id 3sm40297379pfn.59.2016.02.29.14.17.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Feb 2016 14:17:03 -0800 (PST) Sender: Mark Johnston Date: Mon, 29 Feb 2016 14:20:04 -0800 From: Mark Johnston To: hiren panchasara Cc: sbruno@FreeBSD.org, freebsd-dtrace@freebsd.org Subject: Re: Functions not getting picked up by dtrace Message-ID: <20160229222004.GB67805@wkstn-mjohnston.west.isilon.com> References: <20160229213933.GE82027@strugglingcoder.info> <20160229214910.GA67805@wkstn-mjohnston.west.isilon.com> <20160229214923.GF82027@strugglingcoder.info> <20160229220745.GG82027@strugglingcoder.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160229220745.GG82027@strugglingcoder.info> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Feb 2016 22:17:04 -0000 On Mon, Feb 29, 2016 at 02:07:45PM -0800, hiren panchasara wrote: > On 02/29/16 at 01:49P, hiren panchasara wrote: > > On 02/29/16 at 01:49P, Mark Johnston wrote: > > > On Mon, Feb 29, 2016 at 01:39:33PM -0800, hiren panchasara wrote: > > > > I've seen this earlier with others too but this one is the latest > > > > confusing me: em_xmit() in $src/dev/e1000/if_em.c > > > > > > > > Other functions with similar signature are listed in 'dtrace -l'. > > > > > > em_xmit() is a static function with a single call site, so it's getting > > > inlined into its caller. DTrace FBT can't instrument inlined functions. > > > > > > > > > > > Is is because of some optimization? How do I undo it for testing > > > > purposes? > > > > > > There's a __noinline attribute that you can use for this. > > > > Thanks, Mark. > > > > cem on irc also explained the "why" part. > > Davide pointed out that it _might_ be possible that compiler change the > way it decides what to inline and non-static functions can also get > hidden that way from dtrace. Indeed: the compiler may inline a copy of a non-static function at call sites in the same compilation unit as the definition of the function. This case is more insidious since a fbt:::entry probe will exist for the function, and the only way to determine whether the function was inlined at a given call site is by examining the disassembly.