From owner-freebsd-current@FreeBSD.ORG Fri Feb 24 01:31:38 2006 Return-Path: X-Original-To: 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 6AC8416A420 for ; Fri, 24 Feb 2006 01:31:38 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40A0B43D46 for ; Fri, 24 Feb 2006 01:31:37 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by xproxy.gmail.com with SMTP id h29so152677wxd for ; Thu, 23 Feb 2006 17:31:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fvFDDc+ee1qdeVL3Kks3nBwUCfrgiucIiCWzexvyumxEB5kH/BFI/5XKmcR6NMtjswE+Zm5f1RcIJ8t4Dvkcoyp2iheOB1A8Z4dvmxnBDLfZmzwCJ6ZY9kV4pqfmtwvtObymCLB2BPfDv0SqHLvWcbmEaWaPbsKKFiMneXVuq14= Received: by 10.70.110.3 with SMTP id i3mr3391602wxc; Thu, 23 Feb 2006 17:31:36 -0800 (PST) Received: by 10.70.116.16 with HTTP; Thu, 23 Feb 2006 17:31:36 -0800 (PST) Message-ID: <84dead720602231731l4b1ff6cfkd2dcaf752efb127b@mail.gmail.com> Date: Fri, 24 Feb 2006 07:01:36 +0530 From: "Joseph Koshy" To: "Andrew Gallatin" In-Reply-To: <17405.55296.628193.915218@grasshopper.cs.duke.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060223143856.O9642@fledge.watson.org> <17405.53911.686306.362353@grasshopper.cs.duke.edu> <20060223153135.C9642@fledge.watson.org> <17405.55296.628193.915218@grasshopper.cs.duke.edu> Cc: Robert Watson , current@freebsd.org Subject: Re: The sixty second pmc howto 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: Fri, 24 Feb 2006 01:31:38 -0000 ag> Let's say it takes 1000 cycles to issue a memory load ag> because of a cache miss, and 1 cycle to increment ag> something already in a register. Let's also say that ag> your program does each operation the same number of times. ag> Does the 'instructions' count each operation identically so ag> both operations appear to cost the same, or is it sampled ag> from some clock interrupt, so that the memory load ag> (correctly) shows up 1000 times more often? 'instructions' is a convenience alias for closest underlying PMC event that counts retired instructions. Take a look at pmc(3), section "Event Name Aliases". I could add an alias 'unhalted-cycles' that maps to: AMD K8 -- "k8-bu-cpu-clk-unhalted" INTEL P6 -- "p6-cpu-clk-unhalted" INTEL PIV -- "p4-global-power-events" perhaps. I need to check the manual again. (The AMD K7 lacks a suitable event). -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy