From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758671AbbGHNoj (ORCPT ); Wed, 8 Jul 2015 09:44:39 -0400 Received: from mga14.intel.com ([192.55.52.115]:56511 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758240AbbGHNog (ORCPT ); Wed, 8 Jul 2015 09:44:36 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,431,1432623600"; d="scan'208";a="742974802" Message-ID: <559D28AB.4080201@intel.com> Date: Wed, 08 Jul 2015 16:42:03 +0300 From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Arnaldo Carvalho de Melo , Peter Zijlstra CC: Andi Kleen , Ingo Molnar , linux-kernel@vger.kernel.org, Jiri Olsa , Stephane Eranian , mathieu.poirier@linaro.org, Pawel Moll Subject: Re: [PATCH V3 1/4] perf: Add PERF_RECORD_SWITCH to indicate context switches References: <1436258202-6540-1-git-send-email-adrian.hunter@intel.com> <1436258202-6540-2-git-send-email-adrian.hunter@intel.com> <20150707132552.GA3326@kernel.org> <20150707134437.GC3326@kernel.org> <20150707153614.GT3644@twins.programming.kicks-ass.net> <20150707161359.GL3326@kernel.org> <20150707225240.GW3644@twins.programming.kicks-ass.net> <20150708132805.GC3243@kernel.org> In-Reply-To: <20150708132805.GC3243@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/07/15 16:28, Arnaldo Carvalho de Melo wrote: > Em Wed, Jul 08, 2015 at 12:52:40AM +0200, Peter Zijlstra escreveu: >> On Tue, Jul 07, 2015 at 01:13:59PM -0300, Arnaldo Carvalho de Melo wrote: >>> Em Tue, Jul 07, 2015 at 05:36:14PM +0200, Peter Zijlstra escreveu: >>>>> To help userspace in places where all it has is the union perf_event, we >>>>> can reuse one bit in misc to state that, i.e. > >>>>> #define PERF_RECORD_MISC_SWITCH_NEXT_PREV_PID 14 > >>>>> For instance. > >>>> The other option would be a separate RECORD type, which might be >>>> simpler. > >>> Humm, do we really need it? > >>> I think this is just us wanting to, since we are going to add a new >>> record, to make it more useful for other, not right now needed, >>> situations, i.e. if the user is priviledged, there are two other options >>> to get his info, right? > >> I was just thinking that 2 records, each with a fixed layout would be >> easier to parse than 1 record with variable layout. > >> The record space is immense, so from that point it really doesn't >> matter. > > We could do a land grab at some point there, if/when we find some reason > for that... :-) > >> Do whatever is easiest, less mistakes get made etc. :-) > >> No real preference either way, as long we we've thought about it. > > Right, I just don't want to have two u32 carrying -1 for no reason. So you'd be OK with 2 RECORD types? I will see what is involved.