Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751976AbbEGOj4 (ORCPT ); Thu, 7 May 2015 10:39:56 -0400 Received: from casper.infradead.org ([85.118.1.10]:59352 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750793AbbEGOjy (ORCPT ); Thu, 7 May 2015 10:39:54 -0400 Date: Thu, 7 May 2015 16:39:39 +0200 From: Peter Zijlstra To: Arnaldo Carvalho de Melo Cc: Kan Liang , mingo@kernel.org, eranian@google.com, andi@firstfloor.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V8 7/8] perf, x86: introduce PERF_RECORD_LOST_SAMPLES Message-ID: <20150507143939.GW21418@twins.programming.kicks-ass.net> References: <1430940834-8964-1-git-send-email-kan.liang@intel.com> <1430940834-8964-8-git-send-email-kan.liang@intel.com> <20150507113524.GG23123@twins.programming.kicks-ass.net> <20150507115446.GD16478@twins.programming.kicks-ass.net> <20150507141520.GC7862@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150507141520.GC7862@kernel.org> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1498 Lines: 49 On Thu, May 07, 2015 at 11:15:20AM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, May 07, 2015 at 01:54:46PM +0200, Peter Zijlstra escreveu: > > On Thu, May 07, 2015 at 01:35:24PM +0200, Peter Zijlstra wrote: > > > > > > - dropped the @id field from the record, it is already included in the > > > @sample_id values. > > > > Hmm, this would force people to use sample_id; which in general is a > > good idea, but should we really force that on people? > > Well, if there are more than one sample, we need it, right? If there is > just one, we don't need it, what is different? Am I needing (even more) > coffee? > > /me goes read some code... So the question was, do we do: /* * struct { * struct perf_event_header header; * u64 id; * u64 lost; * struct sample_id sample_id; * }; */ PERF_RECORD_LOST_SAMPLES And have the id thing twice if attr.sample_id && PERF_SAMPLE_ID, but allow decoding if !attr.sample_id. Or force attr.sample_id && PERF_SAMPLE_ID if there's multiple events and do away with the extra id field, like: /* * struct { * struct perf_event_header header; * u64 lost; * struct sample_id sample_id; * }; */ PERF_RECORD_LOST_SAMPLES Should we force the use of sample_id on people? -- 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/