Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2543912rwd; Sun, 21 May 2023 23:56:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7YV5P0htS2t1+JxrVSrnQ0bFKomt2M9TOQOKPw5WT3fdAumx3muDAaIXaWHUVrtHjqmGJN X-Received: by 2002:a05:6a00:1681:b0:64d:2365:fbab with SMTP id k1-20020a056a00168100b0064d2365fbabmr13393796pfc.4.1684738569991; Sun, 21 May 2023 23:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684738569; cv=none; d=google.com; s=arc-20160816; b=FSPeoSFDZtnrIxRkD/nPOAjAwGOFJo6AezvX/kKznDSFKKR32u+wAeH68CTMwqUJZs WoELBgANUmJ6thKGmLuHwPQsbi4bBQLyyW0dVyu1yEyO0VQFIaRtDMYiU3vM2w5zVK/r +3J+K9w1Yohi35YsN5RB218h9aTi1REyIotEeyTzU67a90QeXqicTtzsjZzKTTEkjiF/ xhE88ls7+N6onc5ApLWLE/etXgAHtUwPybL+S4exwyar5q2q6zfWmEgAMYQ1qxIALDyS jQwvOVI8gZ7+Z5Um/1cf+2ClzoWN/Fr2f5ZojDwRBdz76nlhX38zOPote7wQqi69O0ch n/Dw== 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=nTVXYQjQQATmf8Mkt9G679/N0B13fTOwc5aaHfZePg0=; b=PbzJZAaw5F09XSAhjsDc7Z7cUFR51JB1UTe5WJVJA4uu0yJBSIjOzf4jQ+bFhHqMgO oXqqBgpfx/XrMVhtdQcWl9W7ic/H57NUoEJlPLWuBYO4IxjvlNWvYT94urLKLOwDdWN1 vgzkLLFDL2aj4bFyqM9hAf3agktbS9CoUhF4iEdDAWLR3oX5aj9j0DXMYXveZkvbCcG9 zyuE2dINzLSDCKQRdQTMtbdY6xYbbG7V+tN3ccztoYI3WLZz9EWopQAxzXh/MJ+qd3x6 qQOo+WkjeLiftSuwYYTXd84h8b9Z+0Ml6gzQ0Xbht4mMDnnZdr5EbIZbv6o6beN0xZXK ke/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=iiAigpds; 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 o30-20020a63731e000000b0050b508f68d8si4304632pgc.206.2023.05.21.23.55.55; Sun, 21 May 2023 23:56:09 -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=iiAigpds; 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 S232027AbjEVGqT (ORCPT + 99 others); Mon, 22 May 2023 02:46:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232037AbjEVGpk (ORCPT ); Mon, 22 May 2023 02:45:40 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E10A1B5 for ; Sun, 21 May 2023 23:44:33 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-561a80d872dso97041677b3.3 for ; Sun, 21 May 2023 23:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1684737847; x=1687329847; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=nTVXYQjQQATmf8Mkt9G679/N0B13fTOwc5aaHfZePg0=; b=iiAigpdsXnQfOAaO/v/Fv96nlaEAFhaaiUurcRIqIJTdcXk4yZT84UKPYZtT8gnXAl rrcTqe20TVqxTno06d806fmEBBSujg/yLqe6D5QSiSJzOa3tLfqxS8LxbCeNL5R2HOG2 wP6M1Wb+0Yn0RrqnaHR1pvTYu4IWwIPuNBv/cMJilRLa7ju2TZAhD55yGnze+5INTpae huN1BhxYAcSrWnNTtXfdgLgNpfhGE0CZRhepAgkRlqWsUZ71tKCmJPcCEriyj97T6wcH QivLA0P58eOG42Re93b11WLQpl0JnX/4wAuQsaX1WvpK5OF0lpCB9UlGfCAkYBLJGbl4 ngVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684737847; x=1687329847; 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=nTVXYQjQQATmf8Mkt9G679/N0B13fTOwc5aaHfZePg0=; b=a1LVekeVUoX18XesMj7qrk/wo6wBip00OiS+JD0FiRu2WeS99Ak610vfGS9pWUPl3b wviOCrgjabs3XqKT3O0MKaAM76eOcJe4wP7KUOruAVKWpHJvj8gaOvUZGSPXnXVCoe3i Ui2GnSXPS3A2xCjK9IkySeS+t04g1AIRz4ClKZukHQMzM8KwAEf4WiZ7UnMGCAjZall1 o/WehhiJq42ZQP78synvKiFS1oYkKCif9GS15vBBeaiOUkTypoBzTnKqdU/RmSbUKWHr VY8y8WKH9qxe3d4StewJvRks9j46yaFMnWpVtKyb/ODl7Y1o8QynsChI2O5r+z2Bz4Pa XG4g== X-Gm-Message-State: AC+VfDzDW322GQVze4vbpjfWKPVF38jeZWFWljbRC8HIGyqNACmzWOf6 dBZJeuIN4jJLFDBSPo2rv16lhZdcR5Xj X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:48d9:8c21:e099:7301]) (user=irogers job=sendgmr) by 2002:a81:a9c7:0:b0:564:c5fd:6d98 with SMTP id g190-20020a81a9c7000000b00564c5fd6d98mr3718059ywh.10.1684737847732; Sun, 21 May 2023 23:44:07 -0700 (PDT) Date: Sun, 21 May 2023 23:43:21 -0700 In-Reply-To: <20230522064330.189127-1-irogers@google.com> Message-Id: <20230522064330.189127-15-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 14/23] perf stat: Avoid hybrid PMU list 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 perf_pmu__is_hybrid implicitly uses the hybrid PMU list. Instead return false if hybrid isn't present, if it is then see if any evsel's PMUs are core. Signed-off-by: Ian Rogers --- tools/perf/util/stat-display.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c index ede0477d958a..164715113b9e 100644 --- a/tools/perf/util/stat-display.c +++ b/tools/perf/util/stat-display.c @@ -19,7 +19,7 @@ #include #include "util.h" #include "iostat.h" -#include "pmu-hybrid.h" +#include "pmu.h" #define CNTR_NOT_SUPPORTED "" #define CNTR_NOT_COUNTED "" @@ -680,11 +680,14 @@ static bool evlist__has_hybrid(struct evlist *evlist) { struct evsel *evsel; + if (!perf_pmu__has_hybrid()) + return false; + evlist__for_each_entry(evlist, evsel) { - if (evsel->pmu_name && - perf_pmu__is_hybrid(evsel->pmu_name)) { + struct perf_pmu *pmu = evsel__find_pmu(evsel); + + if (pmu->is_core) return true; - } } return false; -- 2.40.1.698.g37aff9b760-goog