Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp159222rwd; Wed, 24 May 2023 15:59:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Jsysdl8rAjXIcnAOpMRYsGHKaP0a9/tkUHhZOYHqj1kBwQaThuBvdxdJvTx306axbs55l X-Received: by 2002:a17:903:1103:b0:1ac:6d4c:c26a with SMTP id n3-20020a170903110300b001ac6d4cc26amr23934173plh.14.1684969183609; Wed, 24 May 2023 15:59:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684969183; cv=none; d=google.com; s=arc-20160816; b=uTvZums4atAe2WyRDPcdNe050GVIdyRb52W2GDyvRHYTa22YCQ0vtN/bm+71BBt99D N1gixeMC85Uj0DbMhXLhVzc/ubeQtlF3keFYht6YLgom4RJH5CM3VsE2rWZKdMF00GB+ 0IpLmSfO65zMoSOSLGthApypNkuXJ9PuQArzhaXefEAu+HB+pG2XJDJpd6gZNqvQhMaO rOQWYUXQpa1hi6elJYswV19lMTo+lBZzEdgt/dU2MWkwCK3nTRe7fRJ6Q9qfBFEpIxwk UZV6TfvRfXstjG3sQW7+nnz5FHKX67aMlaIiLpg+d5v+WoXIIrnGBIWrCoktoUz/wVgx VDBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=LP27CftfdHYnLweWt0lX22v4lNIGIpmQh1ljDLrV4jA=; b=cEYtdZTZevo38mE5D4W04yM9k3/mdFpoeRjoN1buoVRhhCLio9wqx5TubpSl0Kcag3 uyniFD47unVoXPWeY5oOrbAQcYrmUXICab+XjtahW2SPqSWgol63flu2BTel17SaYz4r C7xASTaTmGGvzj0wLIbHZR048ZqWsAT0wFV+ABXqcOwAa2ncg94kmmOxr9/XLi8G1YHl u7tTJQZYDqWliVk4OcnLb41wl5yZspxsp0O3v0+DOeV2tST8ZaJ2KN2farDNWvzt2fxL G7JgCLXTsWzQxIYIolav/EpxwCm8xOESGsMxTYwmc5X7AsceLAztHPwD19HyhpV0HAqJ SBCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=lYADs1Vb; 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 n13-20020a170902d2cd00b001ab06251f98si9385190plc.429.2023.05.24.15.59.28; Wed, 24 May 2023 15:59:43 -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=lYADs1Vb; 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 S236151AbjEXWUs (ORCPT + 99 others); Wed, 24 May 2023 18:20:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236857AbjEXWTz (ORCPT ); Wed, 24 May 2023 18:19:55 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B4771A2 for ; Wed, 24 May 2023 15:19:37 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-ba88ec544ddso3169932276.1 for ; Wed, 24 May 2023 15:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1684966765; x=1687558765; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=LP27CftfdHYnLweWt0lX22v4lNIGIpmQh1ljDLrV4jA=; b=lYADs1VbYR/2zJtQXymNcu0XOzeLjuk2kW8pz8OEiHhfvUHQJh2Atn4PtH+6mAx8FM iYs86lOXb4OVWuHjuhHOXgtWOs9oKpr9ezh6cskrIOHTv/UssX/i7dMlopbgunerspC7 h2/ymCj6IQ/Lrk9hfyUloxKOsD5s3zG0Iygd+8lhERAnPDD8++D5i7HBtkpxEJ4iC1rg vNCLff8bwWgFpYXRO1lDLFJ/rNciZmDSrji6mjomGnYqBHisbvWLkfnYTBqQ+3K5Naa0 Cvf9AHBTpz+hi/c1c3jRw2tjeSUq3nv8Qm25Ek5YlVHftKpKiDk4+oTPtNBHD0srlDeB Maig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684966765; x=1687558765; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LP27CftfdHYnLweWt0lX22v4lNIGIpmQh1ljDLrV4jA=; b=iu4n9B09z+183nKDafMlpDHna7lWEuPTO5D3bvi+PP0tQvu9Wmg3fqHErfIoMYRB/g ml+P4moLWQ0WXzGxRaj87H0IDXyiqP+XbsOj7et9IbsyxG6MRpie/8O2tE1gdi/r9qcf lFolDE3O5zoJU/WdqO8R6IevTN3IPugOv7EgsBd3/E3m4PwZqJ1WQD+zbM8iWodBn3Um dYwqIZUnlirIwJFVn4pdxO4omuAb9DOZ1R4+xOOBeZU5stWNj8FrLBeOAUThqywA25nU owZexv5gmrTOorRrQNrd39msUzXPYRgACZui7w7V6zxfmf59MS/ktf9GqtKGQg7SnxZy FXGQ== X-Gm-Message-State: AC+VfDxyGM2qs4PQAXrx/0XE5Q378OhyypdXI7PJDszfT83MYfEddpz9 1epX35yMuYNHKPiZ3XpwstpPkYvYBL/u X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:7aa7:3d2d:76ae:8e96]) (user=irogers job=sendgmr) by 2002:a5b:b45:0:b0:ba8:939b:6574 with SMTP id b5-20020a5b0b45000000b00ba8939b6574mr756838ybr.12.1684966765640; Wed, 24 May 2023 15:19:25 -0700 (PDT) Date: Wed, 24 May 2023 15:18:18 -0700 In-Reply-To: <20230524221831.1741381-1-irogers@google.com> Message-Id: <20230524221831.1741381-23-irogers@google.com> Mime-Version: 1.0 References: <20230524221831.1741381-1-irogers@google.com> X-Mailer: git-send-email 2.40.1.698.g37aff9b760-goog Subject: [PATCH v3 22/35] perf metrics: Remove perf_pmu__is_hybrid use From: Ian Rogers To: Suzuki K Poulose , Mike Leach , Leo Yan , John Garry , Will Deacon , James Clark , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Kajol Jain , Jing Zhang , Kan Liang , Zhengjun Xing , Ravi Bangoria , Madhavan Srinivasan , Athira Rajeev , Ming Wang , Huacai Chen , Sandipan Das , Dmitrii Dolgov <9erthalion6@gmail.com>, Sean Christopherson , Ali Saidi , Rob Herring , Thomas Richter , Kang Minchul , linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_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 Switch from perf_pmu__is_hybrid to avoid implicitly using the hybrid PMU list. Signed-off-by: Ian Rogers --- tools/perf/util/metricgroup.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c index 7de721e9d895..72583f62eda8 100644 --- a/tools/perf/util/metricgroup.c +++ b/tools/perf/util/metricgroup.c @@ -11,7 +11,6 @@ #include "evsel.h" #include "strbuf.h" #include "pmu.h" -#include "pmu-hybrid.h" #include "print-events.h" #include "smt.h" #include "expr.h" @@ -274,7 +273,7 @@ static int setup_metric_events(const char *pmu, struct hashmap *ids, const char *metric_id; struct evsel *ev; size_t ids_size, matched_events, i; - bool all_pmus = !strcmp(pmu, "all") || !perf_pmu__is_hybrid(pmu); + bool all_pmus = !strcmp(pmu, "all") || !perf_pmu__has_hybrid() || !is_pmu_hybrid(pmu); *out_metric_events = NULL; ids_size = hashmap__size(ids); @@ -288,8 +287,7 @@ static int setup_metric_events(const char *pmu, struct hashmap *ids, struct expr_id_data *val_ptr; /* Don't match events for the wrong hybrid PMU. */ - if (!all_pmus && ev->pmu_name && - perf_pmu__is_hybrid(ev->pmu_name) && + if (!all_pmus && ev->pmu_name && evsel__is_hybrid(ev) && strcmp(ev->pmu_name, pmu)) continue; /* -- 2.40.1.698.g37aff9b760-goog