From nobody Mon Feb 9 06:25:10 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89141C77B73 for ; Mon, 22 May 2023 06:45:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231839AbjEVGp0 (ORCPT ); Mon, 22 May 2023 02:45:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232038AbjEVGo3 (ORCPT ); Mon, 22 May 2023 02:44:29 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9730D110 for ; Sun, 21 May 2023 23:44:01 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-560def4d06dso108025867b3.3 for ; Sun, 21 May 2023 23:44:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1684737841; x=1687329841; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=CIGkjMa1wc+2YqtFlHRehMAQM+xcg0ilJ/4qFtAGVUY=; b=giCC+5/4EUcXQRjSQC89cXvki8U/QoJ9QC39UFUvlE9YhMX8kXt+mGCgtOVL2fwtXj 9RRXs0XsNodd8TFub2bKATVyzVjUmQlK1P0rhHHp9wE9dfKGXVKfCAURZsNDk7WxcP2D h835LQNtW3Wd2tuIudgPGE8KyNR2JwIotugDRzykL7GBLizoZIaz68fYsOGB9C8T8DI+ jc0l/pmDf9LnEOzNcFcYNFZ/XzEU7ymU25rBjR5MV69SzbT7VmAi3dtlFxAhCZv60fcq gIoVZ/moxoftYgJuPbyGRDIm/09CXqJaVW7KiOsI4rnR824BsuEbwA4eCd0bOg17T/YW WTXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684737841; x=1687329841; 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=CIGkjMa1wc+2YqtFlHRehMAQM+xcg0ilJ/4qFtAGVUY=; b=J1wzxtLJA8BHiVP6hbMYVBbJXXf6Prq4ChsssyIAwzZdzVegowIOcxL99oP6LQE2Lc A1VllNu57inodqfrQriDGmkvV1iaaRY/ZWkERRM0HPwuccFadF0Qpk1WcyxCY6+v5T0k 4tbK9uIfLz2qEtM9LneDu8TJiRtbjZFk4T6a/xObh2uf6pUm/M8rSUTnl6yUwyb0dwzJ AXYam4nE7RgWiBQqwycJze/ZGfPknX5zFg2FtxlGEcZtNY9vB8BTon+jkrv6/odLi3fN bd11A64iOU1T+jKr2wbtX3p8n6lpmFojw4gEOJ9mU8GrSbnFdGhnxXxp9Kv+cSHO/mKu gSng== X-Gm-Message-State: AC+VfDy0/JoIsIQDBZ8d+LtjSgFWJBjVnt7un8Gtcxm2XugUMvYF6Ok+ 489IuHJZE0DmlWVOcNtOxHZo9Km4mW68 X-Google-Smtp-Source: ACHHUZ4nAbzyYcfkbGak1Sz9NF7WumnGusg226YGZEcoPxxDT3NS3cnRH1HvigWM5JuF2sxAF410WFubqFPH X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:48d9:8c21:e099:7301]) (user=irogers job=sendgmr) by 2002:a81:b54f:0:b0:561:1d3b:af3f with SMTP id c15-20020a81b54f000000b005611d3baf3fmr6010864ywk.8.1684737840821; Sun, 21 May 2023 23:44:00 -0700 (PDT) Date: Sun, 21 May 2023 23:43:18 -0700 In-Reply-To: <20230522064330.189127-1-irogers@google.com> Message-Id: <20230522064330.189127-12-irogers@google.com> Mime-Version: 1.0 References: <20230522064330.189127-1-irogers@google.com> X-Mailer: git-send-email 2.40.1.698.g37aff9b760-goog Subject: [PATCH v2 11/23] perf evsel: Compute is_hybrid from PMU being core 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Short-cut when has_hybrid is false, otherwise return if the evsel's PMU is core. Signed-off-by: Ian Rogers --- tools/perf/util/evsel.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index b39615124672..2c0ed7d25466 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -46,8 +46,8 @@ #include "memswap.h" #include "util.h" #include "util/hashmap.h" -#include "pmu-hybrid.h" #include "off_cpu.h" +#include "pmu.h" #include "../perf-sys.h" #include "util/parse-branch-options.h" #include "util/bpf-filter.h" @@ -3133,7 +3133,13 @@ void evsel__zero_per_pkg(struct evsel *evsel) =20 bool evsel__is_hybrid(const struct evsel *evsel) { - return evsel->pmu_name && perf_pmu__is_hybrid(evsel->pmu_name); + struct perf_pmu *pmu; + + if (!perf_pmu__has_hybrid()) + return false; + + pmu =3D evsel__find_pmu(evsel); + return pmu->is_core; } =20 struct evsel *evsel__leader(const struct evsel *evsel) --=20 2.40.1.698.g37aff9b760-goog