Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932387Ab2FUJNd (ORCPT ); Thu, 21 Jun 2012 05:13:33 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:35408 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932321Ab2FUJNc convert rfc822-to-8bit (ORCPT ); Thu, 21 Jun 2012 05:13:32 -0400 MIME-Version: 1.0 In-Reply-To: <4FE2DE9A.70202@intel.com> References: <1339741902-8449-1-git-send-email-zheng.z.yan@intel.com> <1340208092.21745.114.camel@twins> <4FE28823.80704@intel.com> <4FE2DE9A.70202@intel.com> Date: Thu, 21 Jun 2012 11:13:30 +0200 Message-ID: Subject: Re: [PATCH V6 0/13] perf: Intel uncore pmu counting support From: Stephane Eranian To: "Yan, Zheng" Cc: Peter Zijlstra , mingo@elte.hu, jolsa@redhat.com, andi@firstfloor.org, linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1793 Lines: 43 On Thu, Jun 21, 2012 at 10:43 AM, Yan, Zheng wrote: > On 06/21/2012 04:10 PM, Stephane Eranian wrote: >> On Thu, Jun 21, 2012 at 4:34 AM, Yan, Zheng wrote: >>> On 06/21/2012 12:01 AM, Peter Zijlstra wrote: >>>> >>>> ok, so with this stuff something like: >>>> >>>>   perf stat -ae uncore/event=clockticks/ foo >>>> >>>> will register a counter per cpu, which is somewhat silly since we only >>>> need one per node. What would be the best way to 'fix' this? >>>> >>>> We could of course create another variant of -a which iterates nodes >>>> instead of cpus, -N or so. >>>> >>>> Alternatively we could try and describe this in sysfs in some way, one >>>> possibility would be to include a link to /sys/devices/system/{cpu,node} >>>> or somesuch and use that link to iterate the correct space. >>>> >>>> Any other suggestions? >>>> >>> How about treat the 'cpu' parameter for uncore event as socket id instead >>> of cpu id? >>> >> But that does not address the use case of Peter, i.e., no cpu parameter passed. >> Looks like sysfs might be the only way to do this in a portable manner. >> > It does. For example, on a dual socket system, perf can only register uncore > counter with 'cpu' parameter is equal to 0 or 1. This method is hacky, but it > requires minimal change for the kernel and perf tool. > I was saying, I don't want to have to pass -C x with -a and yet have perf stat only instantiate the event once per socket. I think that's what PeterZ was asking about. > Regards > Yan, Zheng > -- 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/