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--