Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1135841lqo; Sat, 11 May 2024 08:49:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWbJkp6WVa0EfkOo4Vfs4CDL8PHC0exRfqTuoa6mcNU4QOpu0QAeWxA5HFX88zphL4x5/RZwViItiX++GInB0R3rUtUhMFcYkCGLOx/6w== X-Google-Smtp-Source: AGHT+IFVEh0R2R+ibgwhSM6aubDtgXEDolnQsjkBA4t5L5In8BKFBcMbBAB5eA3oihAamCqaIa06 X-Received: by 2002:a05:6e02:b49:b0:36c:551b:1f9e with SMTP id e9e14a558f8ab-36cc1474a9dmr68322305ab.11.1715442554273; Sat, 11 May 2024 08:49:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715442554; cv=pass; d=google.com; s=arc-20160816; b=IH/1v1MXndIl3jOnfvxsJCtJcSTl/H7stKrBwYmotkFTaG1ftmw3A8ifMb6dHsKcf3 iLGuQbXN9arOrD2tNd3qSTX+exIu0Geuv0nLOxM9ShAwPTD9MWNP7HtAoEJSJM5CdGgd hDiXm8HBO/Ufnc5eu6ReOtImEHKOOdgLqn8w51hFyDLkeeuHl2OwwKSBqkw7rHJbvVrL PGUqdTnQ3IlQYtKxAdn70or/TUNuWmuRs6kR0jg85szoTMUZ36Lznh+sailjUCzm1cZB s6HJTwQj0AHfjMOywI2DVZ5xPkPjmz0GVAtSNeyQ/ACSOB0+JKJAgFyujlEtgA/enBE/ BFYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=k8og5UjvgqqZh2amGsYIG3tlxTWe0UGjIIZEXdmDlwI=; fh=dGkexem6/zyewQ8EztJlyJdKDsDdGiormuT0GZE5mSc=; b=fcEy7jrjytHOi1ylfGEJTM9YJShowu5oOR5oUDZJ++udYZBzNnj5B3zCYX21fXtAfo 5m5Cm3CClv0HKlBKbMIb+II3GuPWBI74HLe/zNOyRx4blxSBODBstOE0Zed03CPDkOS2 3NAhFH3YxGnE1WnKxNrASKGya23TO7PVGjTRr/0ojqC1Wr2VXsuZ8d6GwmyrttCqrKEQ vFPbKtSXS9wcZRsGPTIj4nUWfDI6Yo8hEcdm25MIb83RXN/jwc/jp5cia6nL97SakLbc rwFQOPkANsz377LhBlmUaXFhdVwwF1mVWWJrJBQzKkLGW8UwSt4/n+2S9vrNBo+VQUpw hr7A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KwQeR67N; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176617-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176617-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63409e83971si4392053a12.40.2024.05.11.08.49.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 08:49:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176617-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KwQeR67N; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176617-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176617-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CF12228208C for ; Sat, 11 May 2024 15:49:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FC0456B95; Sat, 11 May 2024 15:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KwQeR67N" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BACEE57305; Sat, 11 May 2024 15:49:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715442544; cv=none; b=Qs//GCHTAmDWx3yQ4rp3qRKwLy0E2ZgQPCzE2Q98eonagZ6nL0UMxD/Rdd2Vo2FMR+fn9sn2LgLpS0HeRn/YSbGKgDOiwgui1dC0SH7NF/2umqRDM75w2z28mRk+8by1f/kspbfv8mRyoHKH3xZodYsVNcFO4S4lnWOQlXi6puw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715442544; c=relaxed/simple; bh=Cm1dSG6MFIbUqrUXRgsTNAD+XiHdp/ahM5v138B4wow=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kfinXMnAZnKIi5aUGFvraas9VafG6Q7sLz3RGC5mUTkygA6QwRqNwQ8ejErysngznrnm1OIlVbi5ozWs9k+ukOo8nLgDa9Sn/56gxw3VbllBEtqBrlIhSHKW89N5mycUzb5zczKBdTb5tO3hqzzXUYmwTG8jqNksu93Yo4JuTMU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KwQeR67N; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6F3AC2BBFC; Sat, 11 May 2024 15:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715442544; bh=Cm1dSG6MFIbUqrUXRgsTNAD+XiHdp/ahM5v138B4wow=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KwQeR67NSwanr/FdzIgRlmm3DJjber7CmXWuEUkHTrmU4QGkg8OKN8xWU4d51YblI FetJoqrP/9m9dDs13bd5XoA74bqqIdWEFEfHmKGkIjlELDzGinwuEJqndD8S0euzJH cEQRgcsqVC+SH9Ko+FrHCIRinqNj1nEKCeZrYXtrGaRaAsT3vmntzdsLWrCslkcME/ wY5834wwRHPB/nof5JfQw4hVlUKtvLAwtATxdIETJt5k1VUOoB8V+9xbsEWeZ552a6 JRQrr1hqclYxvObcNkS02PSRQlIGHqDXmSfSjb9b3heQ2hrCWcqhNAANDJubVu6fez FsmsXIcY1WqJQ== Date: Sat, 11 May 2024 12:49:00 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , K Prateek Nayak , Yicong Yang , Kaige Ye , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] perf stat: Don't display metric header for non-leader uncore events Message-ID: References: <20240510051309.2452468-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240510051309.2452468-1-irogers@google.com> On Thu, May 09, 2024 at 10:13:09PM -0700, Ian Rogers wrote: > Achieve this by skipping events that aren't metric leaders when > printing column headers and aggregation isn't disabled. > > The bug is long standing, the fixes tag is set to a refactor as that > is as far back as is reasonable to backport. Thanks, applied to perf-tools-next, - Arnaldo > Fixes: 088519f318be ("perf stat: Move the display functions to stat-display.c") > Signed-off-by: Ian Rogers > --- > tools/perf/util/stat-display.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c > index ea11e3437444..bb6bbb821b5a 100644 > --- a/tools/perf/util/stat-display.c > +++ b/tools/perf/util/stat-display.c > @@ -1251,6 +1251,9 @@ static void print_metric_headers(struct perf_stat_config *config, > > /* Print metrics headers only */ > evlist__for_each_entry(evlist, counter) { > + if (config->aggr_mode != AGGR_NONE && counter->metric_leader != counter) > + continue; > + > os.evsel = counter; > > perf_stat__print_shadow_stats(config, counter, 0, > -- > 2.45.0.118.g7fe29c98d7-goog