Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756137Ab3ILR7q (ORCPT ); Thu, 12 Sep 2013 13:59:46 -0400 Received: from mail-ea0-f173.google.com ([209.85.215.173]:56193 "EHLO mail-ea0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755941Ab3ILR7k (ORCPT ); Thu, 12 Sep 2013 13:59:40 -0400 Date: Thu, 12 Sep 2013 19:59:36 +0200 From: Ingo Molnar To: Andi Kleen Cc: Vince Weaver , Andi Kleen , acme@infradead.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Stephane Eranian , torvalds@linux-foundation.org, trinity@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , Jiri Olsa , Namhyung Kim Subject: Re: [PATCH 1/2] tools, perf: Add a precise event qualifier v2 Message-ID: <20130912175935.GA32511@gmail.com> References: <1374501138-13496-1-git-send-email-andi@firstfloor.org> <20130723060108.GA18396@tassilo.jf.intel.com> <20130723225150.GT6123@two.firstfloor.org> <20130912165733.GA23698@gmail.com> <20130912173617.GI18242@two.firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130912173617.GI18242@two.firstfloor.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1562 Lines: 40 * Andi Kleen wrote: > > Your feature to export 'precise' requirements on events looks useful to > > me. We could implement it not by special casing it implicitly but by > > saying that if ../format/precise contains something like: > > > > attr:240-241 > > > > then that's a natural extension of the config:X-Y format and should be > > interpreted to mean mean 2 bits in the perf attr field. I.e. we could go > > beyond the config bitfield. > > > > Basically the whole perf_event_attr can be thought of as a 'giant > > bitfield', in which we can specify values to export an enumerated list of > > events from the kernel to tooling. > > > > (Using attr:X-Y the config and config1 variants can be expressed as well, > > as the config fields are inside the attr structure.) > > > > The positions within the perf_attr are an ABI, so this would work pretty > > well. > > Wouldn't we need different bits for each architecture then? 32bit/64bit, > some archs with weird alignment rules, maybe different for BE/LE too? > > Ok I suppose it could be somehow auto generated in asm-offsets.c, > although I'm not sure how to get a bitfield offset there. That, or we could indeed start adding specific field names as well, which would have a natural position and order. Thanks, Ingo -- 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/