From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [patch 2/3] performance counters: documentation Date: Fri, 05 Dec 2008 03:33:13 +0100 Message-ID: <87myfbwdue.fsf@basil.nowhere.org> References: <20081204225345.654705757@linutronix.de> <20081204230228.557959174@linutronix.de> <18744.30427.440468.829807@cargo.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from one.firstfloor.org ([213.235.205.2]:54283 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754806AbYLECdA (ORCPT ); Thu, 4 Dec 2008 21:33:00 -0500 In-Reply-To: <18744.30427.440468.829807@cargo.ozlabs.ibm.com> (Paul Mackerras's message of "Fri, 5 Dec 2008 11:33:31 +1100") Sender: linux-arch-owner@vger.kernel.org List-ID: To: Paul Mackerras Cc: Thomas Gleixner , LKML , linux-arch@vger.kernel.org, Andrew Morton , Ingo Molnar , Stephane Eranian , Eric Dumazet , Robert Richter , Arjan van de Veen , Peter Anvin , Peter Zijlstra , Steven Rostedt , David Miller Paul Mackerras writes: >> + >> +[ Note: more hw_event_types are supported as well, but they are CPU >> + specific and are enumerated via /sys on a per CPU basis. Raw hw event >> + types can be passed in as negative numbers. For example, to count >> + "External bus cycles while bus lock signal asserted" events on Intel >> + Core CPUs, pass in a -0x4064 event type value. ] > > This is going to be a huge problem, at least on powerpc, because it > means that the kernel will have to know which events can be counted on > which counters and what values need to be put in the control registers > to select them. P4 has similar problems, and to some extent there's also the same problem on newer Intel CPUs (e.g. with fixed counters and if you consider PEBS which has some special restrictions) -Andi -- ak@linux.intel.com