Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2893800lqz; Wed, 3 Apr 2024 11:32:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXx2w+tKAq+iSZXrJ/jjoIazre6NZ5a+pZj8pxT1DWS5OvKBdhlX5I/4TzUSdtkS0zn6OadfLQwCRQ5l1LQEQI8yFwkl+Fj2CN63hkvpw== X-Google-Smtp-Source: AGHT+IFr6W/3fCTtNtoSUHLwrhAxpdoAZseJ87Na2i1ovcJwKKa8t9USIkhEmYm7WmvwxxAXH2Oh X-Received: by 2002:a05:6a20:d80f:b0:1a1:8899:a2b0 with SMTP id iv15-20020a056a20d80f00b001a18899a2b0mr444773pzb.52.1712169123119; Wed, 03 Apr 2024 11:32:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712169123; cv=pass; d=google.com; s=arc-20160816; b=X9bJOzmYnCDm9/0UwbM18SRH0na9DpsehQX0IZTYJBHmWNuxAvi3iu+rVByZa9qNQL UUp9mjML3PiNUyfS2TLmmhJW4HasekYusw96eg5Ua6wXWMi+NCMeUNdq9BIiDAu6WdK3 dQSRepycFI7hP4am+EdgwwpTmZGP27hKUvZHNt4nOPI6cTIJTkSjapIIiROKgc1ea1/T I+vvHb9E5A7vuTgUSbhU8gOTaUFVEuI5ckBhq4E+Ljg4x6vPskGR6BGSMT23pZ4Kv/nB DhXruEs3LOPhwkMwBpuMjfik6bF3ZBoowfjCuvyO4ma1iqS12Rq4v7PmCi1jZFIoB3Rl qT9A== 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=DavZa0Vn131W4AwpDx3XJiiYAXVAyTt4Vn1WSk/2RBw=; fh=aeFSeFZRZGaFSxq3cSchWcIXO+PiY8bWgn1sE6DW2fs=; b=g3TAe0zKZmG9b0VfncEbXWBHBEJcpQrLeK+DM0K5gBeYnlmXh+7L0kQnQ/Yn5wXHoE bvS4J29kHGlOZg63s/SEFDeovrI+P3nlLdjveeUxby75dTNeGR3ggcKuyZ3k6ap6119A /EtpQyhayzhGCH8AilmMsWybleEhw6wUg6sCWE1yCk79i6IyVfPU7WERhQrIzAaxFLs8 XDrstdr8I8EPrQ0MVClecUe8re44e94BZA9GL7K1kqt6zf8g8ybUZbBI8qiazEUGADKf pAiywSl1FZB8Id0oes5a1WN4awGNnamAGwY6T9PEOZL+8FTlpe3VibEGgZjOWQM+yKDs b9Yg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=wUg0FBYi; 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-130448-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130448-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b3-20020a63e703000000b005e857e45186si13605639pgi.202.2024.04.03.11.32.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 11:32:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130448-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=@google.com header.s=20230601 header.b=wUg0FBYi; 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-130448-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130448-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C4274282177 for ; Wed, 3 Apr 2024 18:32:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9CBFDDBE; Wed, 3 Apr 2024 18:31:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="wUg0FBYi" Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) (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 68F4C1D54B for ; Wed, 3 Apr 2024 18:31:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712169113; cv=none; b=teqPrzGVD3QymasnM4LVut9/TKGpWg60D0o/OU7HjRbUNfKUiJ0GURrbqUzIaVMdDG2rRpvotlnVRMIfhXTvXjhCBpsWGyLBbn35bn5QplhBrTfYp1hIc0LPdyHHEKcyW+GNR8yZ5IQURj6a4EHb9K3MzhnFlNnTj3KG/0n5dRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712169113; c=relaxed/simple; bh=VZ5Lpg28bRGxX9u8+FU6dh/DzQK2KQ4a90DWVcKqgV0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Laxti18cqoXAJ6hTVCCVRwNOh9DBTajOpzUzWINs1JlZimc14UOEdpKsxgxxJFJBpRYT375B0cod9E2D7gZNWf1zpftXQYDU/w0whJ5Ztz7lAvLXgNTB4EYsCG8gT5hZf21V7jmaEIY4l0zp7GNpxGi7Lvl1I3FyXxf/cDNutGk= 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=wUg0FBYi; arc=none smtp.client-ip=209.85.166.176 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-il1-f176.google.com with SMTP id e9e14a558f8ab-369de5d5833so12525ab.1 for ; Wed, 03 Apr 2024 11:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712169111; x=1712773911; 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=DavZa0Vn131W4AwpDx3XJiiYAXVAyTt4Vn1WSk/2RBw=; b=wUg0FBYiIaCHTzI16fW1hrLsqj+qYUAp/KuopK7qaz04sdU/r7a833Bk7HkX9m90vm nyft8M/U1OrqYDtIZi+fJGIZoZ8IHiZpy63FRj61EZmlsFS/LMZ8ZZST2QVlU6AnsFrq uNft4DbcDqlm0ouOBZn9hhmGJzVYM8y8Is2tXQR8CVzuB2sOLlEfpaSnZrSa8yWoiZws UgiiEhk4CB3+w+kNIJgzwt7Wdr6uCXe3JVI4x7lWLskcAEr4eQD6ywziyiqrpGQFuntC LHfKnVWMkst1bB23wugI3i/OuIITrogC6rQR3ami6p1/PmBV+a59z6pt6NIZJNiJqBPQ hZ8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712169111; x=1712773911; 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=DavZa0Vn131W4AwpDx3XJiiYAXVAyTt4Vn1WSk/2RBw=; b=CTaZjl4N4DYe55vipgAdea/6LMJv6ZpeojLK3j9ZIbGPEimEcFxDOd0dr0ztqW9g54 AsNGKgQM8igoK9RsqrHWljU1O3b73dxb53cpdLhkdJjvJqnKSwf1aJ5exOGXFiu9r185 StoBV+fl5Fn+vEJRc18s2PxiUKl/Uk2j5udwD7/jQUw+EbdbHs41Gd+jImfKUXf9DCLl kaTOJC86A67TpmU6jytzubJ1S76DDPYlo/2Q1zWB1zbfK2C+0Cube4vTiPuRTXQuj92R C8MtsdTJAbcUhnQl6g9puXuuMZi3fU60bei+PyJ//gTO6VW10y4Kg6vN1BheBHKesGW7 veCA== X-Forwarded-Encrypted: i=1; AJvYcCVRpaP1N7CNlyDGmTHWv5Oss6Cyq85gP5PmdSrY5b8d3OiK8aubKeu2SJXzr559ycxbBWHlLVGCCkDPY5mTT410zNxOmQkJw66/DsuH X-Gm-Message-State: AOJu0YyxtRXJCEbGHaFQIUhXbEu9iGP6jbI2iFMda4E8LHjW6fE9abm1 +783LuqJ4N68a5VMvJrChw6a9eMiwRCbUExXdWguDdwKStV5byQ7+8QJCRdne3Al9cROhJGdqFK NHmMeZf85hLdHKxvHP8rEKdGRbFnbD5DN0YgH X-Received: by 2002:a92:c750:0:b0:369:a2ae:2634 with SMTP id y16-20020a92c750000000b00369a2ae2634mr271505ilp.12.1712169111299; Wed, 03 Apr 2024 11:31:51 -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 11:31:37 -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 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 via > 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. 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/metricgrou= p.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 str= uct 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 str= uct pmu_metric *pm, > > if (strlen(g)) > > me =3D mep_lookup(groups, g, pm->metric_name); > > else > > - me =3D mep_lookup(groups, "No_group", pm->metric_= name); > > + me =3D mep_lookup(groups, pm->metric_name, pm->me= tric_name); > > > > if (me) { > > me->metric_desc =3D pm->desc;