Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2980442lqz; Wed, 3 Apr 2024 14:27:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+fk3ieQBhbers0aGR1OKmkUuAjZS93J0ZLX7OMPIgKzNiVYu5+ShxJFihttJkJ1NlnrS940WMee54MnbK8mWDGoDtkfQHz7cYNI38wQ== X-Google-Smtp-Source: AGHT+IGczcUUR0mjd9YiwHSlDwtXmvwk/24ARpqdymRhhCXDVJp5dTNPHgD+w0cSTr0b4WGSv/8d X-Received: by 2002:a17:906:f6d1:b0:a4e:15ec:1e25 with SMTP id jo17-20020a170906f6d100b00a4e15ec1e25mr372538ejb.0.1712179642746; Wed, 03 Apr 2024 14:27:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712179642; cv=pass; d=google.com; s=arc-20160816; b=TH2ixqYaFQY1Sz1TAOyz/yi08X5f8tIK9Si049wZ10IjMtuPQ+f+FdGU3wEYQu/Y2F ltVpSvlfYo7nhWHv/UW7ppYh6KWuRmyGz+CQ1gH43AW+lYIHEln5IDzfV3eaGFFPdwLe 2+DCaWs3Smf/hxAmzGdoK69oIJV04vBizZ4G8LClzss+Xj2tc8Bhhh5013FkVXImyBd6 EJnF07OTghtqIyzyYaAH9lGluGkI8kVcIkbYeRQfrM7VyRDuJ4Vkcx+Id05CgyFgKfWQ skQNq5ChAG46Y5GtCUidaGTQ3azR2YJ4fXLHlrBxLVjo9MKqmk8thfpgZKM1mh1uGOAL lIqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Rbh1SNQ31py4i5fXKftYwMRyVWGXZPZmeltHC45xKtY=; fh=u5rLkiYeNfLSOwlYqbxE8qrxQ6yizqmmJgLerNgqqpU=; b=hMFLfGfdyteLJFdUC+PbCngiMc45XQsYPVNGyQsUmo88xS/2b/R++2xaZLeE6IHxCu ZAcEdHBXZnCdvPmRp7nXkg+UehK4bK1ZvwW0GH6TBl8bHdIhB1XIkc9X59j6hMPwo8xU K0vOBpCNxtPZ8QPhsTw8lb89X2TLQGVjIE3KCf7OPmcirlK+dg83vHLuwCCVkz89ia3c X8K2wWFE+HE/fBSkaPXZRvKSLRb29qm1MP6hpXjyfS79+N6Ufo2x/92AO8khBkE8AdGK 2+dKqnDtVtMSJhtWlp80Mi7bxJkkIr5UWNiFIx6ikJy2qzxLAJKOu3nnLyi0crhIwAv5 4vCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gXgdaxMO; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-130478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130478-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id jt21-20020a170906ca1500b00a4e671a349esi3838520ejb.435.2024.04.03.14.27.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 14:27:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gXgdaxMO; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-130478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130478-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 7001C1F276D0 for ; Wed, 3 Apr 2024 18:57:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE87A15445B; Wed, 3 Apr 2024 18:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gXgdaxMO" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 8083F15443A; Wed, 3 Apr 2024 18:57:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712170658; cv=none; b=b4x5SXq8u6/Iy9nsl9EOvAIqinqnvgqQTTPwJsjVUwBGIAyNpXz9wOlE2mti6Ltzagy/amAdrgDuQTEMXdIaAToCTz/SSw17PCUFAvAurS86iR6LwOTTPRdnP/MICuSO5rTECc3pYBNkVipQMLINvXqTiHqVajsMRsSIsfppeZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712170658; c=relaxed/simple; bh=Vhjx7KPQnEG8AJd2dyNwYayiNAX+hSP6AO4U0tDlWfc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Nu7HY4WFO8AnsQAJgk2+ydJgCtWm5UkU1hR2yw50BEw2Akp0oVDYU8mUMJc6AwxjOfcCKBDIRmhTFOkydXgR4xE/PL+VSnYzFatYd3FHRWL1DE/0ziJfz/HKo7dD7SB0HgtkMJKPmLxuD+f9YTjwy/+pMdazfojlBfRmhhScIt0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gXgdaxMO; arc=none smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712170657; x=1743706657; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Vhjx7KPQnEG8AJd2dyNwYayiNAX+hSP6AO4U0tDlWfc=; b=gXgdaxMOkZSVKlZ+TJfga02cT5MJ9B5DLlcTwDXBSallbolS4MV8a7GN QytmjE1q2nT0exjisHgj9WKHcZoSXPoV6NwSFJ5jy2Dl0i2U5Dnriw0EJ 9xx/9NVi+tBn5CWmV6TnxZInGHUg8q0kGdusugQmINcM3NgPLB+iTvv66 +AtD5bfs0sHNeFIqFvCzvAqrc7yh9ACFAcG3+xbquTmc2MT/CdTCO6xbQ cZUsi1SKPLve8XO083EIJjtlYa1UDpYJV07vuHR6I3/6I+owe1+krFbSq ytuhF8bqbAARqcYyI023ohLcA0msRzr0xgcONOBqKIvTN2gaYJGXZFMXT g==; X-CSE-ConnectionGUID: 0XwNGbukTciX67zAbY6dYQ== X-CSE-MsgGUID: TNSEIC/MQ7SQfRVZ24wGxw== X-IronPort-AV: E=McAfee;i="6600,9927,11033"; a="7592974" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="7592974" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 11:57:36 -0700 X-CSE-ConnectionGUID: fOhFYz28SPGDLFMOp8k+Mg== X-CSE-MsgGUID: DOzYTKmdSJ2iRVhjRqGnjw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="41691414" Received: from linux.intel.com ([10.54.29.200]) by fmviesa002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 11:57:35 -0700 Received: from [10.212.3.167] (kliang2-mobl1.ccr.corp.intel.com [10.212.3.167]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 9A5B6206DF9A; Wed, 3 Apr 2024 11:57:33 -0700 (PDT) Message-ID: Date: Wed, 3 Apr 2024 14:57:32 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] perf metrics: Remove the "No_group" metric group To: Ian Rogers 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 References: <20240403164636.3429091-1-irogers@google.com> Content-Language: en-US From: "Liang, Kan" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 2024-04-03 2:31 p.m., Ian Rogers wrote: > On Wed, Apr 3, 2024 at 10:59 AM 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. > 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. 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/metricgroup.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 struct pmu_metric *pm, >>> const char *g; >>> char *omg, *mg; >>> >>> - mg = strdup(pm->metric_group ?: "No_group"); >>> + mg = strdup(pm->metric_group ?: pm->metric_name); >>> if (!mg) >>> return -ENOMEM; >>> omg = mg; >>> @@ -466,7 +466,7 @@ static int metricgroup__add_to_mep_groups(const struct pmu_metric *pm, >>> if (strlen(g)) >>> me = mep_lookup(groups, g, pm->metric_name); >>> else >>> - me = mep_lookup(groups, "No_group", pm->metric_name); >>> + me = mep_lookup(groups, pm->metric_name, pm->metric_name); >>> >>> if (me) { >>> me->metric_desc = pm->desc;