Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp969276lqo; Fri, 17 May 2024 07:07:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX+RKAM4XBBF57SsahsHvdmPBUl1uX7QUuqbJrDir1AXh55VUbyf8Nn/xNcnYyQcBVIBTDXQPix0bZmhDauDKLnzIuPawwvvNACiehGkg== X-Google-Smtp-Source: AGHT+IEn2nO4G3yhJtbV7aaF8+Vl6r4wwbzUFYSCmJsopSwDqw/X5f11E7I9k0eiMEf4BbGzOFl1 X-Received: by 2002:a05:6122:3c47:b0:4d4:2931:7d4d with SMTP id 71dfb90a1353d-4df8829da89mr19843408e0c.5.1715954861598; Fri, 17 May 2024 07:07:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715954861; cv=pass; d=google.com; s=arc-20160816; b=K2yWNxmKrfDcMi8ccZmvHOKaVQixWzWgYemhIF+UQ66YkI/x9NaiMu9cIcjS7fISkR zSM7L4WLAwA9eXLQxU0cyD9sNPakBKZEfSngiE0z/yCQoLRjIvwnNQcf1TW6HXBmaoJY Pw9fglXLDNtTIgKDtsd0KvrYdd/YXKKsSWCNsmj5UiLWS5dkuzxOWESddZ7W9SGPfp4L RE2JLSYzmbXKjF489NS0CRIWjD3X9xzCm3UY5YFM+Qwn5Z62QelPR4vJkdG/lLbBXysO +wqUN4yfu7Cayv35AKlpTI083awU9c8zIhvR5Y3F4fw7m/gk7MURJBXsRsn50dO0HbZ8 /WDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=EPfvxDe6Hhh3qL31CNKs/kZFZpYqVBGETPWyqK12Ri0=; fh=h5dpgt/qtXiV4t8uLCT1fJbAL5uSezw0JOOXjLJ7mX4=; b=hoqQnbEuKOJJUsauUzejtPmcBJ3BdA0k0POFbn9INQUJEcbFJ2g7EP8Auj2xCi4cXP dur6n1nyg68UgHMzt+Lt1wg/fFVxpfVCn5flIOp/OxpiJ2GgDTFyNcdnbzNIhajFgAbt ARnp/K6KL9lgk7/FYKi2eub3xgucSPbA80wPmh1oSA48kL6FwBPYASpnVNc/oI4x/DLK gFF+SyZOLZBR0PTvqJeFFevPTB8i7emIGuzZKCqg5+1TKtNwgDuoyA5xRFSW4pdtJLgn GeEEQM64SseRwHHNb6TvJAuvGHIbx8w7yNFXa3gQL9O1q1LAC/vwB/GQtYIEfiA2EthY ZQgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-182172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182172-linux.lists.archive=gmail.com@vger.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 71dfb90a1353d-4df7bf7f9fasi3358322e0c.67.2024.05.17.07.07.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 07:07:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182172-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; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-182172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182172-linux.lists.archive=gmail.com@vger.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 16D861C22C29 for ; Fri, 17 May 2024 14:07:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1588A5A4FF; Fri, 17 May 2024 14:07:29 +0000 (UTC) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED5FC57319; Fri, 17 May 2024 14:07:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715954848; cv=none; b=LrEK/hIAWysDZYL2TUZ7e/d0+5TiSKzydOOCvkzCzYm9poZftoMlvYC0sjdsX9x3SLXWe5yyWLeGTI3SUloG2SHB1f/hBCb3/B0FdkMhOYTTN+rdlC8WjlaR3mwseSCoDNueh4pYUEKdQbdGAfgwZ6BmJcse/6u9hiDwZIVZyVc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715954848; c=relaxed/simple; bh=tPP1Ft8vq89Koa9tWajFWgaUGoekzB0kwKoXTXQ9q6o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mkCzU5Ck4NBunNeZy0LZ8kuf1yIloNQ9u3e47fv2lHC2ZT6r/evQDmzbwPKLN37pi5BkJSwruVjqacKflkwwokZTJjNrqV2cewDwhy/VW8UW4umDi7pxhoSWNJvbF+X99HtvldnduPnF/yNHC35vDBMWcFbGJpjOo0GFLrXWZEA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-572af0b12b8so4835371a12.2; Fri, 17 May 2024 07:07:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715954845; x=1716559645; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EPfvxDe6Hhh3qL31CNKs/kZFZpYqVBGETPWyqK12Ri0=; b=pQ8Fh6V7TSceo3tui2HSYdOZ+HSDv1+RO6L7JR70fUi2f2HlrHOaA/4J+XcgvIycFU jYB5VkEcMe1jHnz+inBxeGrvTVUbHAf6vyjC0QgUbwYGRpZtjrAL4+lXl82Qcp4jTm/5 Ko5NjZRiIpE6TJl8BoQrKsJVOGAJ8BlGLntkwyNGFn6Tt/Mb9g8ZUdChZS+9S/TJuCQ8 oX96uUra7eR1WToIaOTdvPnsifWRLOd8CsBrfeB9GEe2rKZAmj5M9iVWRkvwxsO1vEIY 5MjNNl/tADBS/+Hc3DKkJV2IK49I0U53SCk6KZ+qE4Xw/y6lEgUqOnF2YTP0exDn90kk TeRw== X-Forwarded-Encrypted: i=1; AJvYcCWQ3ExaN/4L3U7dC2h8vU3bMf3++eqNLf6Voat65q50bIt4mU/z7hQGcDh1vtBF/43to30q2gkL5mhRTFPBY2Q1Pu/imh3VirIEkbjDOTtG3wAlcxgIt7XLm6N/G4fU+Ob2dFAKyL8deWFkt4JvVQ== X-Gm-Message-State: AOJu0YybmelCkXgGV4G124xB/GDvrdRS/Dp+n1Aan9jxjMGPTHGL852Q wpm1dauRG8BqImGzGJFGfkMoF/Hm+o2jCxg2ra74otCxkId6/t1/ X-Received: by 2002:a50:cddc:0:b0:572:67ee:d3d9 with SMTP id 4fb4d7f45d1cf-5734d5ce8e7mr15049601a12.17.1715954845131; Fri, 17 May 2024 07:07:25 -0700 (PDT) Received: from gmail.com (fwdproxy-lla-116.fbsv.net. [2a03:2880:30ff:74::face:b00c]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733bea65b5sm12118612a12.6.2024.05.17.07.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 07:07:24 -0700 (PDT) Date: Fri, 17 May 2024 07:06:29 -0700 From: Breno Leitao To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , leit@meta.com, "open list:PERFORMANCE EVENTS SUBSYSTEM" , "open list:PERFORMANCE EVENTS SUBSYSTEM" Subject: Re: [PATCH v3] perf list: Fix the --no-desc option Message-ID: References: <20240516131544.2885917-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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, May 16, 2024 at 01:15:23PM -0700, Ian Rogers wrote: > On Thu, May 16, 2024 at 6:18 AM 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. > > > > Signed-off-by: Breno Leitao > > --- > > Changelog: > > > > v3: > > * Applied the same logic to default_print_metric() and > > json_print_event() functions, as identified by Ian Rogers. > > I don't think we should change the json behavior. We're generating a > dictionary and the consumer of the dictionary isn't obligated to read > all of it. I tested the non-json output and it all looks good. Thanks. Let me remove the json part then, and send a new version.