From owner-freebsd-dtrace@FreeBSD.ORG Fri Oct 25 18:05:21 2013 Return-Path: Delivered-To: dtrace@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CF6A338C; Fri, 25 Oct 2013 18:05:21 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D7FD276D; Fri, 25 Oct 2013 18:05:21 +0000 (UTC) Received: from [209.249.190.124] (port=49418 helo=gnnmac.hudson-trading.com) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1) (envelope-from ) id 1VZll8-0007c6-1W; Fri, 25 Oct 2013 14:05:18 -0400 Content-Type: multipart/signed; boundary="Apple-Mail=_5ED9664E-A781-43F5-9A39-E92595CF34BF"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1816\)) Subject: Re: "unstable" sdt probes From: George Neville-Neil In-Reply-To: <20131025175147.GB1906@charmander> Date: Fri, 25 Oct 2013 14:05:20 -0400 Message-Id: <4B39604C-C678-43A1-9EFD-D1D7DE69CF02@neville-neil.com> References: <5268F461.7080504@FreeBSD.org> <20131024161620.GA1710@charmander> <526A9CB5.2050207@FreeBSD.org> <20131025175147.GB1906@charmander> To: Mark Johnston X-Mailer: Apple Mail (2.1816) 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 Cc: dtrace@FreeBSD.org, Andriy Gapon X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 25 Oct 2013 18:05:22 -0000 --Apple-Mail=_5ED9664E-A781-43F5-9A39-E92595CF34BF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Oct 25, 2013, at 13:51 , Mark Johnston wrote: >>=20 >> BTW, I've been pondering an idea of reimplementing how the SDT probes = get >> called. In FreeBSD we have a special hook function pointer that we = check for >> not being NULL and then make a function call. >> In illumos they compile the code with an unconditional function call. = This way >> the probe parameters are placed into the proper registers (or stack = locations). >> But during run-time linking the call instructions are replaced with = series of >> 1-byte NOP instructions (5 x 0x90 for amd64). When a probe gets = activated then >> the first of those NOPs gets replaced with 0xf0 (lock prefix), which = results in >> an invalid instruction (and that happens atomically). So, that = allows for the >> SDT hook to be invoked via the trap handler. >>=20 >> So, I think that that results in less overhead for inactive probes, = but probably >> in more overhead for active probes. There is a trade off, but I = believe that >> less overhead for inactive probes is preferred. >=20 > I'd like to find a good way of quantifying the overhead of the current > approach when probes are disabled. Do you have any suggestions? One > thing I'd like to try is just doing a TCP bulk transfer to localhost, > since that'll trip the ip and tcp probes for each packet, and then > just measure throughput with the current implementation and with the > approach used in illumos. > _ Are you wanting to quantify just the workload involved with the probes = being on and off? If so, you want something simpler, and lower overhead than a TCP connection. Perhaps measuring fork() (not exec) with unixbench. I gather you=92re going to do this with hwpmc? Best, George --Apple-Mail=_5ED9664E-A781-43F5-9A39-E92595CF34BF Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAlJqsuAACgkQYdh2wUQKM9IEoACgnaTjSwigUa4G/kJ34kiIaQji Y/oAoJe6r1LS/Mg92LKy6Im1FQMHBNiH =QYel -----END PGP SIGNATURE----- --Apple-Mail=_5ED9664E-A781-43F5-9A39-E92595CF34BF--