From owner-freebsd-current@FreeBSD.ORG Thu Nov 18 04:26:48 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4830C106564A; Thu, 18 Nov 2010 04:26:48 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id 19B098FC08; Thu, 18 Nov 2010 04:26:47 +0000 (UTC) Received: from cpe-74-66-24-70.nyc.res.rr.com ([74.66.24.70] helo=[192.168.1.155]) by vps.hungerhost.com with esmtpa (Exim 4.69) (envelope-from ) id 1PIvZ5-0007NL-9A; Wed, 17 Nov 2010 22:53:39 -0500 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: George Neville-Neil In-Reply-To: <4CE29718.2050508@freebsd.org> Date: Wed, 17 Nov 2010 22:53:38 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4CE29718.2050508@freebsd.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1082) 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-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-acpi@freebsd.org, freebsd-current@freebsd.org Subject: Re: aperf/mperf 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: Thu, 18 Nov 2010 04:26:48 -0000 On Nov 16, 2010, at 09:37 , Andriy Gapon wrote: >=20 > Many modern processors provide APERF and MPERF MSRs which allow to = easily and > reliable calculate average CPU performance level over some interval of = time. > This also allows to notice things like performance boost, which is = generally > hidden from software. > What would be a proper place to add code that would measure = APERF/MPERF ratio? > When should trigger such a measurement and over what interval? > Ideas? Can you point me at documentation for this? This sounds a lot like hwpmc(4) and I wonder if we can make these available in the same way. Best, George