Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2952627lqz; Wed, 3 Apr 2024 13:27:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVL0cg0+22yK1FbQbbxxZCmgsr1+/cp5TsBS64RK9vuzsKMmGXsIfBh0D5VZ4zU/5jkSpcgX/ugNUWH/bmmodo5DX5TRL5jfXApfetzew== X-Google-Smtp-Source: AGHT+IF/Pruc0QkU6vIxdmxj5wk0zSBT3kyUwH/KRJ23GVQVQuqTibhNjBb2iBR3+5YTO00D1jwe X-Received: by 2002:a17:907:972a:b0:a4e:2c84:6424 with SMTP id jg42-20020a170907972a00b00a4e2c846424mr286985ejc.56.1712176021609; Wed, 03 Apr 2024 13:27:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712176021; cv=pass; d=google.com; s=arc-20160816; b=t1X7i29V+W6WEpcd6OlELV4KuLTXiiYb+qC9CDhPFWp3x4BFkyAclZIZYUeXBQvpJ3 M4bYf6qSD+VTgcxGNUS0U0hf5ebobdblzmQQKhh/G67oUtC/R/Gu57W/LhjJUKfZzo4x KJkdfXQLELC7K1uqhJ4xhCkqUpo9fKxvvbJ7wEan+PuHjuSBCsmPsiXjyHksPQ6sPNlk RjUCnbWLjFssOIcClXYqfVhCeuffVBEzRqc3eCNVq3WxpIAEw2LIj/zwRcUpWIhvzl+O rVPps1YI+JNgj2YdIm5QlS6ACxZVuMWhT4H01DQGhkOVd47bGCIBIMFV3M/wdfvf1kGi Ei/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=NFhYmzmWZcVM7eK0cRz8FdXnZiXwCUMIE3os1iAStEY=; fh=cwshUyrF/GFrc6SHE6eJ2hf0d9Oh0HregIpz1zKB7bU=; b=GHW/4ljfKovBfXgyFCOBCVEIfxLoHY+YQMXtuqSi0h2B01yOuN3eCxAknwQc6k8v41 Wq2C6gykZu3ZcEZlbt52j9syB3pMe6pE1j+RapOs/yVUWqSz2/a3K8hsHtgeR9Dj44CA YDpHRvv5+4Zff/LpkGbx1iToAgYBQn1d0si/IvccTLmJUzDCr1pZ52n3Zwv8UWR+FfZv XgCp4q7VZxFS13LMKFm3+UjJAmd7w7UpmguCUiusj53HON/K2o22mRvjbaXfep3iCGDh 45TqSY3NvBQj82NAlQCJISMmS/9/Br6LT2N6witxGTPo+padjiYHndMhyYtPvwOSW65B UXFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=E3+AZuqj; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-130546-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130546-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f4-20020a17090660c400b00a4df40d1ab4si6999261ejk.690.2024.04.03.13.27.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 13:27:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130546-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=E3+AZuqj; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-130546-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130546-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2F9E31F26EDE for ; Wed, 3 Apr 2024 20:27:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90C43155A58; Wed, 3 Apr 2024 20:26:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="E3+AZuqj" Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 42A2B1552E2 for ; Wed, 3 Apr 2024 20:26:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712176012; cv=none; b=MPlhoVTyjE6Zvdy6UE9qb7fNGn9dTndtXkucsy/fe6cgY+i3ioBD462H44yE0F9eAK8z5pP5KZ35V2aDPQm/PR7gqyhye6niA6Z/MkZI71fZlW5K8Vrs2YlVuw+fEh8sYxaO4IvPY/0nU4xPbqD44h1MA90a8Tlw0lqhCUidcaQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712176012; c=relaxed/simple; bh=FBpLE1iiZfLzq2PgZFZDfGl4fcVL4tEXMWlXr8qXDs0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Ji8zi5hjjJFlP1WrrtOXIceXAr62sYFeEJEsPATDs8tf02CJ+Q/4tyOMWKUldlIuri5SuitXgyQr537zexujcvyC89cAhXqVNhlPwCG+8wrPR8fOkkvCvV7d0yoryIe8J62341yoQvSfvm7xDRbvLEcUiHmJVNu/tiXSoXkT6U8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=E3+AZuqj; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1e277154d4cso11265ad.1 for ; Wed, 03 Apr 2024 13:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712176010; x=1712780810; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=NFhYmzmWZcVM7eK0cRz8FdXnZiXwCUMIE3os1iAStEY=; b=E3+AZuqjXjd+FxKgjzE7dLxLq19QVZJzlwKjQmR8RSrEjA51KQJH9KCkpZmHwK6Arj fQKOS9CCTTfHRTlhkNeYcnYpbsP1LQIoIBdC8rkp+YLVbRKiCskkGrhDT99F0m0s0zn2 eMJQtbmrnyKE4O1EnhlCjHbycJuSCty+XHGIcMd782/DWQzMGOHPKiBJjPzCf6+hEuzm B/P1TTf9m9d83ht4HDLVepUjIvwFCQfRjg0wJG11jUFBYtH/k+izLbyJpX57JlJF3ftp A7HWnL5V481+Rbcp+rBwIO1K8pIZWyoV2CVqlM/EQdJxbeL1mtEjeted+k39G7fV+OFb /s6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712176010; x=1712780810; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NFhYmzmWZcVM7eK0cRz8FdXnZiXwCUMIE3os1iAStEY=; b=Q+BqoV6gmBCZT5pMjEOq5wNjNsGcbusyU0qXjWt5XXebxti8XPPbHYeQtmZvvhjfyQ dlJ7riGzKzn7hMKXU08McasRSCGNCSpGst3btEQyDjurTbiuIaFLJ5yQKGVbIJofhbuz FGxgZJCpXxMbL6lYCqWdx7FhyQzIA9ZcoEMY4LG0ARqOoVBndar94148vKw9e2sZX7G9 CHFIcn4J8ESnh00kJjJlz6uTsuIosFGrDiJnYOvrphJlDSSHVZzcwK6N0BlG09waa+0G BJgScZk5v8jv29Wv3QUhJ0YFs2nzC5VJc6rke+59UNuppN8Eyr19dbuNppD6BO/NimOv CgIg== X-Forwarded-Encrypted: i=1; AJvYcCUoYxGg1MGvUpWDKFTRR2WY5jBhx2Txwur5i4+WaBHk/EdoHYvITNnVDsqcEBR3bjNdUBfAmHLejw3TkWSEJqaxG8A7fHmCdiPqMa51 X-Gm-Message-State: AOJu0YwxaJ0KWqBuXPlyswK8Ogjl2JolQjdL6DRpZIdlbcwygUTHBsxK +tBtNE1w+HTXiHd5VIkliU1Dn0diilzO1c16rV55AVnvcKp/E4Z1rnZ9H2kDulzfXC0reKErqNC WJI3jM+fddNi6XtIDHn/DknZjsxxUy+CPqm1O X-Received: by 2002:a17:902:c405:b0:1e2:1955:1b1c with SMTP id k5-20020a170902c40500b001e219551b1cmr303929plk.27.1712176010154; Wed, 03 Apr 2024 13:26:50 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240403164636.3429091-1-irogers@google.com> In-Reply-To: From: Ian Rogers Date: Wed, 3 Apr 2024 13:26:35 -0700 Message-ID: Subject: Re: [PATCH v1] perf metrics: Remove the "No_group" metric group To: "Liang, Kan" Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 3, 2024 at 11:57=E2=80=AFAM Liang, Kan wrote: > > > > On 2024-04-03 2:31 p.m., Ian Rogers wrote: > > On Wed, Apr 3, 2024 at 10:59=E2=80=AFAM Liang, Kan wrote: > >> > >> > >> > >> On 2024-04-03 12:46 p.m., Ian Rogers wrote: > >>> Rather than place metrics without a metric group in "No_group" place > >>> them in a a metric group that is their name. Still allow such metrics > >>> to be selected if "No_group" is passed, this change just impacts perf > >>> list. > >> > >> So it looks like the "No_group" is not completely removed. > >> They are just not seen in the perf list, but users can still use it vi= a > >> perf stat -M No_group, right? > >> > >> If so, why we want to remove it from perf list? Where can the end user > >> know which metrics are included in the No_group? > >> > >> If the No_group is useless, why not completely remove it? > > > > Agreed. For command line argument deprecation we usually keep the > > option but hide it from help with PARSE_OPT_HIDDEN, so I was trying to > > follow that pattern albeit that a metric group isn't a command line > > option it's an option to an option. > > > > Perf list has a deprecated option to show the deprecated events. > The "No_group" should be a deprecated metrics group. > > If so, to follow the same pattern, I think perf list should still > display the "No_group" with the --deprecated option at least. Such metrics would be shown twice, once under No_group and once under a metric group of their name. With deprecated events this isn't the case, you can only see them with --deprecated. Given we can see the metric without the No_group grouping, what is being added by having a No_group grouping? It feels entirely redundant and something we don't need to advertise. Thanks, Ian > Thanks, > Kan > > > Thanks, > > Ian > > > >> Thanks, > >> Kan > >> > >>> > >>> Signed-off-by: Ian Rogers > >>> --- > >>> tools/perf/util/metricgroup.c | 4 ++-- > >>> 1 file changed, 2 insertions(+), 2 deletions(-) > >>> > >>> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgr= oup.c > >>> index 79ef6095ab28..6ec083af14a1 100644 > >>> --- a/tools/perf/util/metricgroup.c > >>> +++ b/tools/perf/util/metricgroup.c > >>> @@ -455,7 +455,7 @@ static int metricgroup__add_to_mep_groups(const s= truct pmu_metric *pm, > >>> const char *g; > >>> char *omg, *mg; > >>> > >>> - mg =3D strdup(pm->metric_group ?: "No_group"); > >>> + mg =3D strdup(pm->metric_group ?: pm->metric_name); > >>> if (!mg) > >>> return -ENOMEM; > >>> omg =3D mg; > >>> @@ -466,7 +466,7 @@ static int metricgroup__add_to_mep_groups(const s= truct pmu_metric *pm, > >>> if (strlen(g)) > >>> me =3D mep_lookup(groups, g, pm->metric_name); > >>> else > >>> - me =3D mep_lookup(groups, "No_group", pm->metri= c_name); > >>> + me =3D mep_lookup(groups, pm->metric_name, pm->= metric_name); > >>> > >>> if (me) { > >>> me->metric_desc =3D pm->desc;