From owner-freebsd-current@FreeBSD.ORG Wed Jun 14 15:38:50 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8D3716A503; Wed, 14 Jun 2006 15:38:50 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0658843D58; Wed, 14 Jun 2006 15:38:48 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id DD72F1A4E14; Wed, 14 Jun 2006 08:38:47 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 2D1E5514E7; Wed, 14 Jun 2006 11:38:47 -0400 (EDT) Date: Wed, 14 Jun 2006 11:38:47 -0400 From: Kris Kennaway To: John Baldwin Message-ID: <20060614153846.GA37259@xor.obsecurity.org> References: <20060613021543.GA71283@what-creek.com> <20060614103614.Y34121@fledge.watson.org> <20060614095449.GA82424@what-creek.com> <200606141021.45669.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <200606141021.45669.jhb@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@freebsd.org, Robert Watson , John Birrell , current@freebsd.org Subject: Re: DTrace for FreeBSD - fbt output 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: Wed, 14 Jun 2006 15:38:50 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 14, 2006 at 10:21:44AM -0400, John Baldwin wrote: > On Wednesday 14 June 2006 05:54, John Birrell wrote: > > > > critical_enter 4364385478 > > > > critical_exit 4364385478 > >=20 > > The points I wanted to make about these calls are: > >=20 > > 1. critical_enter is called so often that the debug printf that /could/ > > be compiled into it should cause an increase in global warming if > > you tried. 8-) >=20 > No, it's not a printf to the console it's a printf into the a circular > buffer (see options KTR) and the system has been run with it enabled w/o > burning the machine up. :) For point of comparison, I added an implementation of spinlock profiling in my kris-contention p4 branch which does a KTR every 100 mtx_lock_spin() operations, and this has less than 5% performance impact. KTR is very cheap since it is just a single atomic op to increment the buffer index, and then a couple of pointer assignments. Kris --9amGYk9869ThD9tj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEkC2GWry0BWjoQKURAhG6AJ4l6g7QlubMs4H4k/Jk/GKYLkFK+gCdExNH ByNmdl4Grn9GJ1TjU0DYhpg= =sH1V -----END PGP SIGNATURE----- --9amGYk9869ThD9tj--