Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1140038lqo; Sat, 11 May 2024 09:01:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWnqmm8Ede/uhfAoGVC6raVvdT6htSq3P8W/pCYdzQCf7EMqPubLlygxZNpC2nnY6D2Guz0ipZ1XWiyEnsbV5pLUUrOubKSgOpHnxLL5g== X-Google-Smtp-Source: AGHT+IFu8jnH/jBCCz519oCDPSFGgJXaivEugNuOoKDomWS3OjwZOXw2XQnWwqf/qSdANmRg7XLC X-Received: by 2002:a05:622a:1111:b0:436:5f58:84d5 with SMTP id d75a77b69052e-43dfdac2475mr69837371cf.21.1715443265190; Sat, 11 May 2024 09:01:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715443265; cv=pass; d=google.com; s=arc-20160816; b=uCWad/C8jnfobIYCch1xC2so/F+qgiTwGMUMd4zrqP9IGoIK1xcghvOIBcQHlrU1VY YIAuCGb8kETI+ev2kxLNtt2xOmqHbQpx5UHOA21fu6p3xiKpEIRIf79TzX13f7/0YYoa Vo6zVxXoDZ7Mt+u3kL0urx36nTmF/wGawFfwRb753Al1oLafQ+eicd1AWVAmhw3ScKGI xkon5TPl8hcY1mLJJfqwjbhfrCCW7r1Oz08r4LsJc0XAwZTdAEjoQpgFyLq4VVTnI3ba mTMqNs0C/Nypa7tygrIxveFTDPk7T8UjXYG1l9v79Armk9aSps05qQFdo0l20CLzUF6m numQ== 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=dw+sudU2ZCviw0vYSVx0p1vQ+M3N1Dv4N9UusV2Lifk=; fh=0c28QxtUcq1KgNYcj3YXGEIskRECU/VjaYudOsNxv5U=; b=ZkB5pKJ/w9W5x1x85NTa09R03wTripsv3xGQhFELsk/M8Stnx6eM5eLbVSPWMrCqU1 fM7+yy+YOg2KwmyR3Ckb3T32mGn+IwYzNNPFehsQeV9tFfRzbHi2n9lOPnBKzbksah1E FuxHUTi64vbny/qX5Ol6Z5ujpaRRAuWJtSvWAor8SVWRlCxzuLiIxe5pigVoTWos5Rz8 nDYa155cIvuJDr54PIi4hhhBdzWKvb8C1GwQQwrIdlcNWAeFldMzs8FfzcwV0uq1cEL7 8zRtv3Ccd9KOXk4Ugm60F62FTh/b7aXNAPICrplci6kKVXfRTqpHJRiyphf72/RFCMbF mqoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZbKFK7Nk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176627-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176627-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43df566faa6si61542861cf.294.2024.05.11.09.01.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 09:01:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176627-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZbKFK7Nk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176627-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176627-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E64561C20D4A for ; Sat, 11 May 2024 16:01:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8326E56B73; Sat, 11 May 2024 16:00:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZbKFK7Nk" 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 A27C859168; Sat, 11 May 2024 16:00:22 +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=1715443222; cv=none; b=hCxZtEH1IelOSMPWK3zCGT8sckaCGeZm4ELkRXFC51zryFL5wxVMuJnKMVMtspmv6LQs5PAMiHQf72qxX0mPbdSVi495gZ609GEAAiowzpCe/qOEvouvrkkuKLCdE/ZnYElijYZo+7HRmo6oofh0zl3v41JJAXltCab8LG9l61M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715443222; c=relaxed/simple; bh=4RU5pmRcasLa6t1vQtWaBBhz5hmNj4hjlUm6xeEFBYA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Abr68oAOYLO/HFJVxIjBe+RqascvqofELwJGYbXo2z/kM+kDp6VJiiutZuVARN0dBpaBoRyhAq6qtLSrEiVawakUOl1a+Qe/bwcODo914BWY5C4Vua0hjSY9pjhYfmDRKx7mdLlwdzXOJw52TSkY49jeFV+TeXX1z2EV/P4J9xY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZbKFK7Nk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2747C2BD11; Sat, 11 May 2024 16:00:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715443222; bh=4RU5pmRcasLa6t1vQtWaBBhz5hmNj4hjlUm6xeEFBYA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZbKFK7NkcUtfy8eyfMICBL7Y5FjoJ4D+wkK79WT0kd4QDXPyrKvv3EeWCCXIcCTj9 cMoBUHh8IAfajolbibai/xk+c7rViLljrhZvRuO11fjLaBUcoIH9RdTK8TwgILQ9Co xfNs1Y2eXkeLNCU31UKOMP9gIPN7CWFUcd+Hd/MjCY5ccuAObxL/1wLHscOZSeBGGF CJ3h2jia4LiXhGG1QBIkQKJux44DjNnpVL5GELkRiqUTI0BOr5DM6ax73GzlzLSJDI Bec73GXmWEXEzEJyjSCUy7pWMK3nMehh4xK/wR75YU98EAw++9pSOqrYSp9dsR5K1k DQV+ntdJrAVCA== Date: Sat, 11 May 2024 13:00:19 -0300 From: Arnaldo Carvalho de Melo To: Breno Leitao Cc: Peter Zijlstra , Ingo Molnar , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , leit@meta.com, "open list:PERFORMANCE EVENTS SUBSYSTEM" , "open list:PERFORMANCE EVENTS SUBSYSTEM" Subject: Re: [PATCH] perf list: Fix the --no-desc option Message-ID: References: <20240508133518.3204221-1-leitao@debian.org> 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: <20240508133518.3204221-1-leitao@debian.org> On Wed, May 08, 2024 at 06:35:17AM -0700, Breno Leitao wrote: > Currently, the --no-desc option in perf list isn't functioning as > intended. > > This issue arises from the overwriting of struct option->desc with the > opposite value of struct option->long_desc. Consequently, whatever > parse_options() returns at struct option->desc gets overridden later, > rendering the --desc or --no-desc arguments ineffective. > > To resolve this, set ->desc as true by default and allow parse_options() > to adjust it accordingly. This adjustment will fix the --no-desc > option while preserving the functionality of the other parameters. Thanks, applied to perf-tools-next, and added this: Committer testing: Before: $ perf list --no-desc cache: longest_lat_cache.miss [Counts the number of cacheable memory requests that miss in the LLC. Counts on a per core basis. Unit: cpu_atom] longest_lat_cache.reference [Counts the number of cacheable memory requests that access the LLC. Counts on a per core basis. Unit: cpu_atom] mem_bound_stalls.ifetch [Counts the number of cycles the core is stalled due to an instruction cache or TLB miss which hit in the L2,LLC,DRAM or MMIO (Non-DRAM). Unit: cpu_atom] mem_bound_stalls.ifetch_dram_hit [Counts the number of cycles the core is stalled due to an instruction cache or TLB miss which hit in DRAM or MMIO (Non-DRAM). Unit: cpu_atom] mem_bound_stalls.ifetch_l2_hit [Counts the number of cycles the core is stalled due to an instruction cache or TLB miss which hit in the L2 cache. Unit: cpu_atom] mem_bound_stalls.ifetch_llc_hit [Counts the number of cycles the core is stalled due to an instruction cache or TLB miss which hit in the LLC or other core with HITE/F/M. Unit: cpu_atom] After: $ perf list --no-desc cache: longest_lat_cache.miss longest_lat_cache.reference mem_bound_stalls.ifetch mem_bound_stalls.ifetch_dram_hit mem_bound_stalls.ifetch_l2_hit mem_bound_stalls.ifetch_llc_hit Signed-off-by: Breno Leitao Tested-by: Arnaldo Carvalho de Melo - Arnaldo > Signed-off-by: Breno Leitao > --- > tools/perf/builtin-list.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c > index 02bf608d585e..58589f67e800 100644 > --- a/tools/perf/builtin-list.c > +++ b/tools/perf/builtin-list.c > @@ -491,6 +491,7 @@ int cmd_list(int argc, const char **argv) > int i, ret = 0; > struct print_state default_ps = { > .fp = stdout, > + .desc = true, > }; > struct print_state json_ps = { > .fp = stdout, > @@ -563,7 +564,6 @@ int cmd_list(int argc, const char **argv) > }; > ps = &json_ps; > } else { > - default_ps.desc = !default_ps.long_desc; > default_ps.last_topic = strdup(""); > assert(default_ps.last_topic); > default_ps.visited_metrics = strlist__new(NULL, NULL); > -- > 2.43.0