From owner-cvs-src@FreeBSD.ORG Sat Dec 1 14:33:55 2007 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D8BB16A41A for ; Sat, 1 Dec 2007 14:33:55 +0000 (UTC) (envelope-from jkoshy.freebsd@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.186]) by mx1.freebsd.org (Postfix) with ESMTP id 0835D13C442 for ; Sat, 1 Dec 2007 14:33:54 +0000 (UTC) (envelope-from jkoshy.freebsd@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so2284617rvb for ; Sat, 01 Dec 2007 06:33:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:to:cc:subject:in-reply-to:references:user-agent:mime-version:content-type:from:date:sender; bh=I0HYqLWl8z18TP7Shk2fjg7n38W8GoOQ32Slt3yczXQ=; b=MibQ344QFPCwkOKatBOLqmI8vxnDwe+8mW2GaqvaoH0lpkqwoUcL6lR8TX5wyWAMekEkTMrjF/KsssJGnXlJtjQHBNQpU9cDOHwiVpifvatXQDN8c8rrM2oCXIS/9fsQXUbQubfzDftjiiPp5d9+cXM/HDPDZwkcWvU2HpWQvnw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:to:cc:subject:in-reply-to:references:user-agent:mime-version:content-type:from:date:sender; b=b/zZbEMzaAVzOn4syEGXa1hyw43zLIdannXCCNKO8UTR8zaL6dODjc55a/yN1gukaPFHZ+XXenVQ84l4onVW8naDrxpQ6D37114DNrlY+wHMAdzQr/iq+n7U/+OaHD6wVOwC0lB8gD/zof4DxGKzEys6cZBQyALFLCwtBdqAgJM= Received: by 10.140.174.18 with SMTP id w18mr4589674rve.1196518066758; Sat, 01 Dec 2007 06:07:46 -0800 (PST) Received: from moria.unixconsulting.co.in ( [203.145.156.9]) by mx.google.com with ESMTPS id f34sm9897734rvb.2007.12.01.06.07.37 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 01 Dec 2007 06:07:46 -0800 (PST) Message-ID: <868x4ebjce.wl%koshy@unixconsulting.co.in> To: Kris Kennaway In-Reply-To: <474E7D31.3000904@FreeBSD.org> References: <200711290643.lAT6hxDS004790@repoman.freebsd.org> <474E7D31.3000904@FreeBSD.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/21.3 (amd64--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII From: Joseph Koshy Date: Sat, 01 Dec 2007 14:07:42 -0000 Sender: Joseph Koshy Cc: Joseph Koshy , src-committers@FreeBSD.org, cvs-all@FreeBSD.org, cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/hwpmc hwpmc_x86.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Dec 2007 14:33:55 -0000 jk> Intel CPUs with family 0x6, model 0xE and later (i.e., Intel Core(TM)) jk> have a PMC architecture that differs somewhat from previous CPUs in jk> family 0x6. Even though the basic programming model is similar, the jk> documented set of legal values that may be loaded into their PMC MSRs jk> differs from that of the previous PMCs in family 0x6 and reusing bit jk> values valid for the older PMCs could result in undefined behaviour in jk> the general case. kk> What is your expected timeline for fixing this and the other missing CPU kk> family support (Intel Woodcrest, etc)? It is on my list of things to do, after callchain capture support is folded into CVS and stabilized. kk> It's a serious limitation to not be able to run hwpmc on modern kk> CPUs, and I argue that a partial implementation is much better kk> than no implementation. The problem is that our 'partial implementation' isn't quite correct. At the time ps@ committed rev 1.4, the processor was unreleased and documentation was not available, and our guess was that the PMCs in the new CPU would be compatible with earlier CPUs. Unfortunately the PMCs aren't totally backward compatible. These compatibility issues may not affect a user who wants to run `pmcstat -S instructions' on a single Core CPU (the common case perhaps) since the alias name `instructions' translates to a P6 PMC event selector that happens to select the same hardware event on a Core PMC. However, users specifying other kinds of P6 PMC events run the risk of measuring garbage and thus being lead on a wild goose chase. So I'd rather not claim that hwpmc can support a PMC family when it actually can't do it correctly. Regards, Koshy