Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761634AbbEERBJ (ORCPT ); Tue, 5 May 2015 13:01:09 -0400 Received: from casper.infradead.org ([85.118.1.10]:42013 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754774AbbEERBB (ORCPT ); Tue, 5 May 2015 13:01:01 -0400 Date: Tue, 5 May 2015 19:00:47 +0200 From: Peter Zijlstra To: "Liang, Kan" Cc: "mingo@kernel.org" , "acme@infradead.org" , "eranian@google.com" , "andi@firstfloor.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH V7 3/6] perf, x86: handle multiple records in PEBS buffer Message-ID: <20150505170047.GP23123@twins.programming.kicks-ass.net> References: <1429517270-8079-1-git-send-email-kan.liang@intel.com> <1429517270-8079-4-git-send-email-kan.liang@intel.com> <20150505130723.GN23123@twins.programming.kicks-ass.net> <20150505131737.GC16478@twins.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F0770180BC7E@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F0770180BC7E@SHSMSX103.ccr.corp.intel.com> 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: 1179 Lines: 27 On Tue, May 05, 2015 at 04:36:51PM +0000, Liang, Kan wrote: > > > RECORDs are generic, and should live in the core code. > > > > > > Also, you should introduce this RECORD in a separate patch. > > > > On that, this is lacking a RECORD definition in > > include/uapi/linux/perf_event.h:perf_event_type > > The PERF_RECORD_LOST already defined in perf_event_type. > Are you suggesting to add a new dedicated RECORD type, like PERF_RECORD_COLLISION? Yes, this should be a new RECORD, LOST_SAMPLES maybe. The thing is, LOST is about the ring-buffer running out of space, this is very much not the case here. Reusing it like this creates the situation where userspace cannot tell what happened, and that is a very bad thing indeed. What we want to convey is that we dropped/lost a (number of) sample(s). So the objection against the RECORD_COLLISIONS name is that it names the reason we did something, but not the something we did. -- 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/