From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757012AbdKOMAf (ORCPT ); Wed, 15 Nov 2017 07:00:35 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:35640 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755415AbdKOMA1 (ORCPT ); Wed, 15 Nov 2017 07:00:27 -0500 Date: Wed, 15 Nov 2017 13:00:22 +0100 From: Peter Zijlstra To: Alexander Shishkin Cc: Arnaldo Carvalho de Melo , Ingo Molnar , linux-kernel@vger.kernel.org, Will Deacon , Adrian Hunter , Markus Metzger Subject: Re: [PATCH v1 1/4] perf: Allow suppressing AUX records Message-ID: <20171115120022.o7hmfdb7vpeikvjl@hirez.programming.kicks-ass.net> References: <20171114123024.11517-1-alexander.shishkin@linux.intel.com> <20171114123024.11517-2-alexander.shishkin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171114123024.11517-2-alexander.shishkin@linux.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 14, 2017 at 02:30:21PM +0200, Alexander Shishkin wrote: > It has been pointed out to me many times that it is useful to be able > to switch off AUX records to save the bandwidth for records that actually > matter, for example, in AUX overwrite mode. > > The usefulness of PERF_RECORD_AUX is in some of its flags, like the > TRUNCATED flag that tells the decoder where exactly gaps in the trace are. > The OVERWRITE flag, on the other hand will be set on every single record > in overwrite mode. However, a PERF_RECORD_AUX[flags=OVERWRITE] is > generated on every target task's sched_out, which over time adds up to > a lot of useless information. > > This patch adds an attribute bit that enables suppressing such records. What this fails to explain is why a separate suppression flag makes sense. Why not suppress the thing on overwrite mode and be done with it? > + if (!handle->event->attr.suppress_aux || > + (handle->aux_flags & ~(u64)SUPPRESSABLE_FLAGS)) > + perf_event_aux_event(handle->event, aux_head, size, > + handle->aux_flags); That wants { }