Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2735804rwo; Thu, 3 Aug 2023 14:13:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlF+2JKjRlpWS8AQBytJLhnMTTCldZeX4Ru2FGmbqM5SSwPo7yZ1S3oCuU+F6BoYTkleBtlB X-Received: by 2002:a2e:2414:0:b0:2b6:bb08:91c4 with SMTP id k20-20020a2e2414000000b002b6bb0891c4mr8882199ljk.42.1691097194855; Thu, 03 Aug 2023 14:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691097194; cv=none; d=google.com; s=arc-20160816; b=qcDfC96tS7tdbQTFGD1foRcNLvNb2i7Wj+2+Powq/q1Pf6jkEbCo4W1vhJaC+52qKB 7S+B+0Ky6PlSKCecbeaIi5YdXloopVeqWdJrDW5cG8WGmpfgXlxoHzql6Htj2D+WKoLd pCY5YlxoB69V17lzV/nseprCPOLFk2KfTDe8ia/l3pXywSQREnTJB2udQB4N5SzTBq5y L+zm1EJaNEw92c6qptj7XJVDdxamr4CFMwYOi5pC38MRabmaE7p3VuK9JXsgX75pYlFt Qp8NujAzLhvdmq7INpJ7dGYBFdZ7hzpumf0g2xWqkByd+Dkm7lgmKm+3lVNkcHjmtWH3 1Sgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Nbag7+nCIIQ/r7EGTdwhMD5Dc3eumwl9v+ptA5o5Ob4=; fh=O9XlW8FBX7JConm1UUw98Z0nkalLunr7Ycc2xHNeIrI=; b=LL6lz+h89SFuKlqXQ+QUJ85eCGWbJqOELmNb2VqiJwuNeskkRl1Ud0LJUjt6uyiutI i6IujqrmDS33nqvrXUo6itCwhKY5qB8NDVME3YRYHb7x5tP1NJWGg/ZpfHpWP+RslBlQ 2J869nUm3VWdBqD4UPPzX1BGj82LhsVtzjYnnExFpNLSNUg9pp7sgXwQxwedAqvnfhWv xLQCxfGTB8OElXwXrVGpxrdokzeMBL/ImpwpAmRLbGa0ixyp2RkbKVJIgowIFfdBg0TH ZK+C4pEzVaZSVn3W00FDei2vQZFmhELjWPja1ehiWMJoTzLNDMQQOJeFU1alWn/AdMyy pY/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tPF1San+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o17-20020a170906775100b0099ba5ef93d6si492979ejn.891.2023.08.03.14.12.50; Thu, 03 Aug 2023 14:13:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tPF1San+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230316AbjHCUzF (ORCPT + 99 others); Thu, 3 Aug 2023 16:55:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbjHCUzD (ORCPT ); Thu, 3 Aug 2023 16:55:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01E0E1990; Thu, 3 Aug 2023 13:55:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8B78A61EA9; Thu, 3 Aug 2023 20:55:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFEA6C433C8; Thu, 3 Aug 2023 20:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691096102; bh=J0pw286lqUZz/i8c9f1pp7D3EBEVQFjY/BPNNe+g5/s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tPF1San+pjrHnaPYnj5ratiNxm/hmI1PME1zK2aRIhPZ5LubCUwj2+djZ7SjtRYkf GKegSKLpMerR8dAaSlWu3vvG88TwLLhjlYPsBnHybWBPmNwn/NPwCHhoV35LBvDVj1 asUfNMVGnbxUq3rftrWpX3XP0h8tYu1yNieQQ5fFsSkn1xymk18tYAhvHvKqjt0Ziz gNkEYrsm9ZFAaVavmEjCXhLt6lKl6rkD4daWGB4EkKa3O4sAe97c4MjDjfPV6R+bAT ps3fsBYVBIcji2J9PQqADNaCNSAESE96Uvy6MCzZKGd5iLqnRDbgJifGsm7zZDaG8d 6m95HVIYrtQPA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 5A518404DF; Thu, 3 Aug 2023 17:54:59 -0300 (-03) Date: Thu, 3 Aug 2023 17:54:59 -0300 From: Arnaldo Carvalho de Melo To: Andi Kleen , Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , Athira Rajeev , Claire Jensen , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] perf stat: Don't display zero tool counts Message-ID: References: <20230801205452.3380578-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230801205452.3380578-1-irogers@google.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Aug 01, 2023 at 01:54:52PM -0700, Ian Rogers escreveu: > Skip zero counts for tool events. > > Reported-by: Andi Kleen Andi, Have you tested this? Can we please have your Tested-by? - Arnaldo:1 > Signed-off-by: Ian Rogers > --- > tools/perf/util/stat-display.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c > index 7329b3340f88..d45d5dcb0e2b 100644 > --- a/tools/perf/util/stat-display.c > +++ b/tools/perf/util/stat-display.c > @@ -931,6 +931,11 @@ static bool should_skip_zero_counter(struct perf_stat_config *config, > */ > if (config->aggr_mode == AGGR_THREAD && config->system_wide) > return true; > + > + /* Tool events have the software PMU but are only gathered on 1. */ > + if (evsel__is_tool(counter)) > + return true; > + > /* > * Skip value 0 when it's an uncore event and the given aggr id > * does not belong to the PMU cpumask. > -- > 2.41.0.585.gd2178a4bd4-goog > -- - Arnaldo