Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756545AbbFQOLZ (ORCPT ); Wed, 17 Jun 2015 10:11:25 -0400 Received: from smtprelay.synopsys.com ([198.182.47.9]:36097 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754490AbbFQOK6 (ORCPT ); Wed, 17 Jun 2015 10:10:58 -0400 Message-ID: <55817FDD.7060902@synopsys.com> Date: Wed, 17 Jun 2015 19:40:37 +0530 From: Vineet Gupta User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 Newsgroups: gmane.linux.kernel.cross-arch,gmane.linux.kernel To: Peter Zijlstra , Alexey Brodkin CC: "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "arnd@arndb.de" , "arc-linux-dev@synopsys.com" , Arnaldo Carvalho de Melo , Vineet Gupta Subject: Re: [PATCH 1/8] ARC: perf: support RAW events References: <1433852372-29494-1-git-send-email-vgupta@synopsys.com> <1433852372-29494-2-git-send-email-vgupta@synopsys.com> <20150615153029.GE3644@twins.programming.kicks-ass.net> <4881796E12491D4BB15146FE0209CE64656C9E81@DE02WEMBXB.internal.synopsys.com> <20150617133358.GR3644@twins.programming.kicks-ass.net> In-Reply-To: <20150617133358.GR3644@twins.programming.kicks-ass.net> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.12.197.3] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2414 Lines: 54 On Wednesday 17 June 2015 07:03 PM, Peter Zijlstra wrote: >> But in case of raw events we need to set a counter with index of a >> > particular event. For example we need to count "myevnt0" events. For >> > this we need first to find-out what's an index in events list of >> > "myevnt0" event and then set event counter to count event #x. >> > >> > Even though in theory we may set raw even passing an index of desired >> > event > That is what I was thinking of, until I read: > >> > but given my explanation above each particular CPU may have the >> > same event with different index in events list. > ... > >> > Fortunately there's already a patch series floating in LKML that >> > attempts to simplify usage of architecture-specific events, see >> > http://www.spinics.net/lists/kernel/msg2010232.html > So you _can_ know a priory in which order the events are for a > particular CPU ? Say through /proc/cpuinfo. > > I would much prefer the raw thing to remain a number; it puts you in > pretty much the same place as most other archs, including x86. Sure, but that doesn't mean we start using the index of event as a raw ID. There are zillion ways to configure cores and the index will certainly start varying. Which means that user has to determine at run time (using whatever /proc/xxx) what crun corresponds to. Why inflict such pain on poor guy. The current raw event, despite representing an ASCII string is still a u64 number. So it is not more "raw" than what others have. We can get rid of the swapping business when setting up a raw event, by making sure that cached values from probe are already in same format. But using index as a event id is no go sorry... > > On x86 we have a huge event list (see the Intel SDM for example) and the > only way to access those (currently, without the above patch series) is > to look in the PDF under the right model and enter the numbers by hand. It is not much different for us ! > The only way in which your hardware appears different is in that it > seems to include these names in hardware; which to me seems a waste of > perfectly fine silicon, but hey not my call. Yeah sins of the past.... :-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/