Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3813449ybg; Fri, 25 Oct 2019 09:15:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6BWWwV25FMbAA0qRjqyqlnmfjBP/2nZLs4gBGA411lSLPcQuxau/qUbYLVAoAJC/XBeae X-Received: by 2002:a05:6402:1a55:: with SMTP id bf21mr4783787edb.61.1572020140167; Fri, 25 Oct 2019 09:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572020140; cv=none; d=google.com; s=arc-20160816; b=IXs9XlwG+kIP084xfVv61ehyhnSDOqXv5WFj81D++fvLt4CCJnJlQKxQ2P0M/UwOk3 X490R23Y7Ox2r5t/Wa/NFZ4PzW5+boJbqikes9HWJ7jpY3hNXYaHay081NN1yY6b36WO OgFJXitQw4WLFIH1HlINy7siQq98LT1xrM19o9qxWfm76PWckWVQGRmIr98nszk77uOz c2IH9ZzlKKUifg1tbwOEz4yd4do9V+U5EQkhhjTrOJEI11DIVGJqRRWcwr66NoKDdJsL 0kOG4iSvm9e+ecfMSlzoIvv8e1obvqEvnMxBhsEUHq1h73wjHmZQD5cGKEYrwgA5mq5R nY3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lKm45370EhrH8zZ54o5/PLqtFk0+iVXt+l8pnOZZmpQ=; b=m43j4D8Fx3GPYmIjvbsZLQnqSkNeIEJc4fMwD92x11GcNzpgp/XN30tuNF9cd8nXDm HeIPEJU3gL6Mr2TiFVu0kmEwKtgT+3A/XC58eBz0f7c/cNDWy8LoW5w1lO0m9nvEIyhg JKBfJfdK5AVtZmK/mgExaeq2eEy/3HuC9Hr8MYwsVYkBPIyk51M1tRRe/T/xdwSeQ4Nn /NtvSapIhvNy+RTpxNHhM+Mtmo/UQgADQYJp4XEKKO0LqsWlyFRQarMU79VuOUzjS8Cr e7Jwifh1Fz9MwUtoLl3O6vi4YiE6B5mf9lAa25s5sjs25Ql+CTBzvi//fwqz7w2VKHg0 Rd+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=OFeOLH4z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g25si1497103eds.210.2019.10.25.09.15.15; Fri, 25 Oct 2019 09:15:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=OFeOLH4z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409354AbfJXOJi (ORCPT + 99 others); Thu, 24 Oct 2019 10:09:38 -0400 Received: from merlin.infradead.org ([205.233.59.134]:57958 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389658AbfJXOJh (ORCPT ); Thu, 24 Oct 2019 10:09:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=lKm45370EhrH8zZ54o5/PLqtFk0+iVXt+l8pnOZZmpQ=; b=OFeOLH4zOtHPY7V/OhqklOhC+ 87yER8lXEp9nRYndHoU//ASyXzhJa72HswKTcm9o412MHF930mrFXeHte8Qg0nfR4cpvTCPoIz3bk q+sCK08K4J8Oa7Z2s+fND8Gh/2l0CRzYfR95JMQXNil7PM9+FCO4Dea4fvbfoYjGNwi3+aZw4By3p PoA/Aou3Je1LkOkLeeMjI2LGbdwSIyjh1sdK2kDI/eAEJKzlUqt/DVoqHWlmFasw3ghMGD3TVspqf VtbX2ZmyK5n3KeTFHz2bLBwqA2bf/rB3WL10Ws1jg9GXYvdFC2AO/0x1AT+pySpKRSjEOLZ/8vBJ6 /yQl3eJCg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNdnv-0000Ey-VK; Thu, 24 Oct 2019 14:09:32 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 0F333300489; Thu, 24 Oct 2019 16:08:32 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 812062B1D7CA5; Thu, 24 Oct 2019 16:09:30 +0200 (CEST) Date: Thu, 24 Oct 2019 16:09:30 +0200 From: Peter Zijlstra To: Alexander Shishkin Cc: Arnaldo Carvalho de Melo , Ingo Molnar , linux-kernel@vger.kernel.org, jolsa@redhat.com, adrian.hunter@intel.com, mathieu.poirier@linaro.org, mark.rutland@arm.com Subject: Re: [PATCH v2 1/4] perf: Allow using AUX data in perf samples Message-ID: <20191024140930.GH4114@hirez.programming.kicks-ass.net> References: <20191022095812.67071-1-alexander.shishkin@linux.intel.com> <20191022095812.67071-2-alexander.shishkin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191022095812.67071-2-alexander.shishkin@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 22, 2019 at 12:58:09PM +0300, Alexander Shishkin wrote: > diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h > index bb7b271397a6..84dbd1499a24 100644 > --- a/include/uapi/linux/perf_event.h > +++ b/include/uapi/linux/perf_event.h > @@ -141,8 +141,9 @@ enum perf_event_sample_format { > PERF_SAMPLE_TRANSACTION = 1U << 17, > PERF_SAMPLE_REGS_INTR = 1U << 18, > PERF_SAMPLE_PHYS_ADDR = 1U << 19, > + PERF_SAMPLE_AUX = 1U << 20, > > - PERF_SAMPLE_MAX = 1U << 20, /* non-ABI */ > + PERF_SAMPLE_MAX = 1U << 21, /* non-ABI */ > > __PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /* non-ABI; internal use */ > }; > @@ -424,7 +425,7 @@ struct perf_event_attr { > */ > __u32 aux_watermark; > __u16 sample_max_stack; > - __u16 __reserved_2; /* align to __u64 */ > + __u16 aux_sample_size; > }; While I understand; would it not be better to make that a u32 (like sample_stack_user) ? That way we only have to ref the output format and not also the config format to get more output. > /* > @@ -864,6 +865,8 @@ enum perf_event_type { > * { u64 abi; # enum perf_sample_regs_abi > * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_INTR > * { u64 phys_addr;} && PERF_SAMPLE_PHYS_ADDR > + * { u64 size; > + * char data[size]; } && PERF_SAMPLE_AUX > * }; > */ > PERF_RECORD_SAMPLE = 9,