Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2875713lqz; Wed, 3 Apr 2024 11:00:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXg9tBfx2ZGsRaWGFRTRLO5cDzLLjqfHU7ekj0OiahAxdNVBeAzh1FaptnYAGFfRB22voaYgllAnYcyAhKP24sRTJVh8m4sMbhWv7qweQ== X-Google-Smtp-Source: AGHT+IGY+JhR3VKE8iaY7lLum821HZQ/+QWlZK/XuhH7XC4EHzZtTGGWFyoc4J8tXuv3u/R6qCJO X-Received: by 2002:a9d:6d88:0:b0:6e6:c081:4850 with SMTP id x8-20020a9d6d88000000b006e6c0814850mr17736745otp.17.1712167233916; Wed, 03 Apr 2024 11:00:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712167233; cv=pass; d=google.com; s=arc-20160816; b=YddyTHUhsGU5ib75TOXfWQ+g0XS9vmKzcJG654VhilfR9JHf+WgIPSnVdphXdhBods SRxu7PFizj5ZssmVEYELvVZ1oq1jPUWIXY56VZI9krbDO+iuwRb5oXwoT/56nI+ACMfj f8AyjlFxiNrxSx8mn2B35WxNIwhP9b3dM4NEgWMh9hzts9jnlJIa2S0nlRypigCPa7AS 4qiaao8T4GdR4+kCwASJgSUqaue06ZTEA1BIc8Mc+qb8R7Mp3XOI7CdMAv8E/ckUsvBR HlG40+kaYR6LnEitbx70RQb44QE7mYrIZM3LRaTKA4wvOzdMytXYwiaOT6CljtMeuF/f Lgzg== 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:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=xNOG29DLjLHBJdbM62BZ9Dls2p58GxphXbKTpDbvuqQ=; fh=UGEZP3cjW2/4wn1d9e/YJ6kPs4vgOT9R2x6xbFJZsyg=; b=Hv3uiAAidm+c/O1qnmfJ1naXz8UuslsIxCBz9wyF1pk5oOP7ltKdesF9C/FbhDxkqB AtweP4brVgLpIT24mzrjowyZyreVUQQbs8e+liV0PF0axRaDBr21xLmpGf6AJwsoDdnF miUkN7UbytTzTwZ1TUq/uOBx3ED1A/mNM5Lhfyrb6t7a9Z5nTqoyTO+CjuDTc+wxagOs gREtjEB7ctLTeekrLDc6wlSxOVjGXSrBmxQbk5UoOC4yW/TaOSN2VLQtKCzp4tPAv4Oy CUkGXNgZki+v8ww25ELNUSR7BBNDfcxXBTLm+rJpcSSMo46bZzZwD2iQvPynACcvnDBO aGUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hn+PeJVb; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-130405-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130405-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s42-20020a05622a1aaa00b0043445888e75si1352518qtc.355.2024.04.03.11.00.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 11:00:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130405-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=@intel.com header.s=Intel header.b=hn+PeJVb; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-130405-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130405-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 637A21C2638B for ; Wed, 3 Apr 2024 18:00:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3DBD153818; Wed, 3 Apr 2024 17:59:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hn+PeJVb" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 77B9514AD0A; Wed, 3 Apr 2024 17:59:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712167174; cv=none; b=n+wZregErwjWDx6DXaaNWWdXz2X6WL/BjZKwBUf8+DCEz9hmxnWMH45HNIRJEPhuQx1uvP+LO8ZB2IUQEa7/7Dnrp4Dg8OU1qgvxcWJykC9S1GDECEjNoKzqbh73iNnAPOiD1+e3VPIPNf71XHkjCKGYfVvYVRarqgp48yysKrY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712167174; c=relaxed/simple; bh=YpPcVoU2i+8jYbMzFhpBpOEGsZ1d/CJK8vqqvOc9Jbg=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=L3JcN5zCp/y2dVyAjATCAnRqikJzg3Ma+i6jrEogAmVOaPFj/PXguyNWid5l16UFbjnuHB1TnguLfH7vyHytZ04Ae12bUbYepmJgy+w0lyy2+oYW2g2Ce96iSahMxc25TnaeKaIs9aE5mx1XLuqgwZvOePh+iyUyuw+XcV85wcM= 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=hn+PeJVb; arc=none smtp.client-ip=198.175.65.9 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=1712167173; x=1743703173; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=YpPcVoU2i+8jYbMzFhpBpOEGsZ1d/CJK8vqqvOc9Jbg=; b=hn+PeJVb3EX00+HkOZIKw7YXV1DMPdSMO5qb8B6Lubta6BURX5FOXUkr huJswxfXLqM9TUJE+kEvJ2SiSMJ8k+MlD3T2AAw76VS+uCEVb+o+hQnew BXkIckWKhdwHdsQYiu8GTp6mhU+lFHf2Qq9uO4lHS5DyiuQ1pbIV71g5U PFoeosfcr4+qEDYlzSMlbZwwYMBVyiuaDgSyMW91AF91DuTsgog4khedy vSE2NMifNS2dwIPaTdv4kYUgyQRaQkcjFSpuRx2RzY23KOXV8GYGDA2G5 qDWOFcxY3lX0tFJSz++dWLpAYvlRgxNLRltVezx2/lznI0V3v/wc9+e7t g==; X-CSE-ConnectionGUID: +fnq7bCIQZKxEBBs5Q1a0Q== X-CSE-MsgGUID: N9zYZkqmSuigDqf50vsGuA== X-IronPort-AV: E=McAfee;i="6600,9927,11033"; a="29896620" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="29896620" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 10:59:31 -0700 X-CSE-ConnectionGUID: IE8wHYLUTNGHTHLnQmcU2g== X-CSE-MsgGUID: d3+gSpSRQ1O+Wwca2U+Idg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="18937724" Received: from linux.intel.com ([10.54.29.200]) by orviesa007.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 10:59:31 -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 558EE206DF94; Wed, 3 Apr 2024 10:59:29 -0700 (PDT) Message-ID: Date: Wed, 3 Apr 2024 13:59:28 -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 , 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: <20240403164636.3429091-1-irogers@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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? 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;