From patchwork Wed May 24 22:18:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13254648 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC828C77B7A for ; Wed, 24 May 2023 23:20:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version :Message-Id:In-Reply-To:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HjvXpPDKDW6eMhDksb3Y1v8fvhf1cbU1dDXL5r0UlBA=; b=BZJ3p93caNi1b7 IwS7qaAjpOb43e94iar8r2zdm7OdYYrGkLrn+XUkcrzAwS1hXLq3wUu1NCE99B3WsuDTpf5fXpZ/9 goH9CciyW3c+4EZDydFPp52C35eKFte8jSHiTn5YMsD4eH6wBkOtIP51pFr+Ou75RZtXq2kJ4BKMh trip8kajb2K202DlasctERXvPOvSLsyqkCtIpzvQ5sqgi5ytJnBdZn+6CXykx17HvmLrfMAlyNqxX yZS2GWVNrxKqZOzXrUD3OFl6Sm6wQSXutXaS6RwvpM6oDBIYAPWaMuDUEOlbJO7rHPKUIuOomi2pD xSJy5uAOQfeL7xJ28ozA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1xmL-00EvDo-10; Wed, 24 May 2023 23:20:25 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1wpN-00Emxm-0X for linux-arm-kernel@lists.infradead.org; Wed, 24 May 2023 22:19:30 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-ba83fed5097so3153550276.2 for ; Wed, 24 May 2023 15:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1684966768; x=1687558768; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=xohs+RPxgQPJo1czRcXVjEN6Ep07r6+wQ3n8ob7tftg=; b=IgfaH00zw1PRDkqwd/QwU4Sg5TJxQ7feV/pDX0v7A7dRzdpe13pLIG6GaS/JKXqvvg ev2dtZc04e9KWDyVr2G86au0saClF58Kh2k5UqyhLSFrZRim46pA8475WEW10d+nK7Q8 AuJ5Qrusdz12jpgCcZCwhMqm6k5meHHrATRSwUpNhDNhVd1uq/as7AANV0NTOK0sIDaC ylyZNhgvKKWdgx6eILUv8tsxyqBsW3CbkhNkI5BgQ5mVc2/sMQtqHzkp55NEtG97JRyE PCuklBhHC8GBSKDKsBZoIfEtwM9VGUpouwsQJY4fCBgYF5Cb9M3ZTxkWD9/qm6+pKPCH 27CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684966768; x=1687558768; 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=xohs+RPxgQPJo1czRcXVjEN6Ep07r6+wQ3n8ob7tftg=; b=lk+GRYMbzu7t4GIevbQeTkShkXHleMQvRgxV/p48jDOnLX8NBp7v+Ho6n/vZ5kb3MV KctcDEKbWBh9DnDpY4NhWsBGAouItWNtnczWl03IF2xfy0aikM1N2zElKqjAlE9Zt7Ap mWGvPADu+E+GwGJEWm1GsxOLcdL3Df7F3UomIB4oHPHiumP6KHw+ALqVrZF6CF6lCQQZ 1rr9liObQ1Xg1emIAbvRW/djtnK0EMtkw0WlI0mNanZ39nxshBIdkNRSTvspnTeCS7o5 z4zIaXTa2FXzoN7ZlxIcdY5eg9bbNgpft/5dCuUVXMCGmZRHhaGAwOIHnwkdC1y72ZSe HcfA== X-Gm-Message-State: AC+VfDwrGXAs22PlkyieVG+wTiH6eEhs/0ahOMoNv0l3GX7DNkvNih+e GvVb32xPSGEt6lOm69lJqREWucAI7mSp X-Google-Smtp-Source: ACHHUZ74qT7vuVNsbtmSv30uJE6ZkJtddOJ2ysembhatAzi/XHx184YwKBpC20/oi8O5XKcLYnGlaUmTM7AH X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:7aa7:3d2d:76ae:8e96]) (user=irogers job=sendgmr) by 2002:a05:6902:4ca:b0:ba8:84fb:6ad with SMTP id v10-20020a05690204ca00b00ba884fb06admr789426ybs.4.1684966767759; Wed, 24 May 2023 15:19:27 -0700 (PDT) Date: Wed, 24 May 2023 15:18:19 -0700 In-Reply-To: <20230524221831.1741381-1-irogers@google.com> Message-Id: <20230524221831.1741381-24-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 23/35] 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230524_151929_199709_5ECBCBCC X-CRM114-Status: GOOD ( 13.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c index ede0477d958a..78ce7095dbcb 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,12 @@ 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)) { + if (evsel->core.is_pmu_core) return true; - } } return false;