Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1682405rwd; Tue, 13 Jun 2023 12:32:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4mRA3WrNMv5UyhpR1to5gi+5mCSqO1YZjf5qg8FLbWkioe76d+DCzmX6qtgmu8GZEDbFyl X-Received: by 2002:a05:6808:2019:b0:39c:870a:cc07 with SMTP id q25-20020a056808201900b0039c870acc07mr10487779oiw.32.1686684778440; Tue, 13 Jun 2023 12:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686684778; cv=none; d=google.com; s=arc-20160816; b=CXOciAgsTbod3i+WZ9wcZMbbE9qwUjSScN5/TgOcBTUSaXyJvLxVZX8HQrGRgDxJXQ pwrqBO+tn5SNe21GzYRJWmk8Ib+b/UUlZwZBznOk3qNBRBjemYA0vMbbEaZPaOKw3aes 5D0QUUau5/7ONVZmiI+popk8D4xELJOaqQAEyhWx8R3+wpcJke37xv06zsZD5Eh9ZRwF VfCsr8yfN1ZOEbvywNRukHflITdtQgyXfiSUO/J6vnLhBGEDrq8UmhGSjiDKFnFJJXSV wSsTH7cfCVNPJIuaakFFmW69yQzzYJpOwrz5100lkRv+RHdnjM9m04bfEz5hLN9Ggun3 JGkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+D4HqqatbIO3Y5m0N5oSclLaQb1DH2u/EcPqTcyMdUY=; b=OqbcJZiUv6q3/p+k9tkzAZBcDfTgq0Z8eHa4YlSQrdjTs/DbuvRKYuZJRedHKcVuN7 4/DUQ7CDHYgHm3J5+LwBaZ2mMCooLmEV5S/0n2+5NS1vrZOmXKEEIh1DKlWbLmZ1OD3n eOCC9Cmd7Z4Fui6ATJkNfbsMgZIVTaPBwN7BmCVCBqu3omjlBE/f7MYgMW/R5/K8TsIm 0AqVATohYbj/COX6PzJQ0oPDuNY5HCJnA+Jdn207NGhzruV52RULxz0QZrJ7e9olqBD6 QC1zz1fxfmeWMc00Un9yHcMHn+TOr2IMuNgcr2zOQ2o9W7fllbSIgniTzmflSawPy9k+ GI6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=q0muuWaN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s19-20020a639253000000b0051f74e18927si9223635pgn.184.2023.06.13.12.32.46; Tue, 13 Jun 2023 12:32:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=q0muuWaN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239238AbjFMTXC (ORCPT + 99 others); Tue, 13 Jun 2023 15:23:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231401AbjFMTXA (ORCPT ); Tue, 13 Jun 2023 15:23:00 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DD39199B for ; Tue, 13 Jun 2023 12:22:59 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1b3c43279c1so28855ad.1 for ; Tue, 13 Jun 2023 12:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686684179; x=1689276179; 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=+D4HqqatbIO3Y5m0N5oSclLaQb1DH2u/EcPqTcyMdUY=; b=q0muuWaNlWvcxZ9tDn4dPyU7aLwExy2pkcaRATURBAZqx4uoWjsVXmYTq6jb7n44VT UqCEi3DslYIJI6vE43yWA8mq2SYHY80TD7YgLu8ToS7a9sFle5Kify3B2uhdFPDkNd56 nr/L1B0NOspgUiuAF4TlE0mUHhIg9zSV64zO6fHXCJylxuaW+wTdmFreO0jsNBOR6LPP gRIe2zGenyDwb3742K433vs78XjUo343CKVtEkJtZzf5Ys0ieETiIGiOnfk50L6zdrxG 7N1CVbE0Veaz0xW/rVFYDwa3QQVnraDOT079dIoW4SDKhtPnvwpwGiC8D3bL5Fm1D6nx n+MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686684179; x=1689276179; 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=+D4HqqatbIO3Y5m0N5oSclLaQb1DH2u/EcPqTcyMdUY=; b=cf/YDP8SWY+fkADUfC9e/Zb5cEbhnoB/Hc5l58f4PpCPJF8OkX6RSd5dBJXazYB3oE o60Z0OOIIlGWJcZpfNmKL8I1tXxzWLi1PUjPv2Y2aKYkNUvpqoI+5LSmWfP04/1DYuDw PgMMwlmQvauziKIKVyc5UuXaRQXJls9ZrRTV5vwnwuRKcfwEhExSmsjJKcFWC67edPL3 7VXOnsK0eD1d96JjlalPw9gXbxinb14lJfGwCEFpwTfK6tnyD6MXc3V8VATC3ZPoWgm5 XmgAivJWyN5N7gSZI1QczsNfEeaT8fBnM1W5cdRGr0L4wPomAnKYg1o6o1AOoCPx31Ev +dVQ== X-Gm-Message-State: AC+VfDwFfdjZgjEkwI5xcOPIZekHfW+N3/x5hAcSwsf3cLRjGitt3+6v QBThlCD4PRvw5PrQ6vdOEXoUxkpiJRybk31xOW2qAg== X-Received: by 2002:a17:902:c205:b0:1b3:b200:a3dc with SMTP id 5-20020a170902c20500b001b3b200a3dcmr41025pll.2.1686684178700; Tue, 13 Jun 2023 12:22:58 -0700 (PDT) MIME-Version: 1.0 References: <20230607162700.3234712-1-kan.liang@linux.intel.com> <20230607162700.3234712-2-kan.liang@linux.intel.com> In-Reply-To: <20230607162700.3234712-2-kan.liang@linux.intel.com> From: Ian Rogers Date: Tue, 13 Jun 2023 12:22:46 -0700 Message-ID: Subject: Re: [PATCH 1/8] perf metric: Fix no group check To: kan.liang@linux.intel.com Cc: acme@kernel.org, mingo@redhat.com, peterz@infradead.org, namhyung@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, ak@linux.intel.com, eranian@google.com, ahmad.yasin@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 7, 2023 at 9:27=E2=80=AFAM wrote: > > From: Kan Liang > > The no group check fails if there is more than one meticgroup in the > metricgroup_no_group. > > The first parameter of the match_metric() should be the string, while > the substring should be the second parameter. > > Fixes: ccc66c609280 ("perf metric: JSON flag to not group events if gathe= ring a metric group") > Signed-off-by: Kan Liang Acked-by: Ian Rogers Thanks, Ian > --- > tools/perf/util/metricgroup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.= c > index 70ef2e23a710..74f2d8efc02d 100644 > --- a/tools/perf/util/metricgroup.c > +++ b/tools/perf/util/metricgroup.c > @@ -1175,7 +1175,7 @@ static int metricgroup__add_metric_callback(const s= truct pmu_metric *pm, > > if (pm->metric_expr && match_pm_metric(pm, data->pmu, data->metri= c_name)) { > bool metric_no_group =3D data->metric_no_group || > - match_metric(data->metric_name, pm->metricgroup_n= o_group); > + match_metric(pm->metricgroup_no_group, data->metr= ic_name); > > data->has_match =3D true; > ret =3D add_metric(data->list, pm, data->modifier, metric= _no_group, > -- > 2.35.1 >