From patchwork Fri May 26 21:53:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13257429 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 881B1C7EE33 for ; Fri, 26 May 2023 23:06:01 +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=ZjXfZ0idZQ+LCahXqkriHnwxCSLwBtjC7uzifnG6Dcs=; b=HX7hodwdOsih59 5zT8rUFMdbTfJ2MhS9ctRqEq8teTG7ARc9iW1eA+HN0X5H1wky506XoZ31ipoxm1OMx1FMiDsRZDf Fi1w05o1aw1RoxAaPd2l/64CDBYizB98Mo7E4PJKau0NlYiffU5fVF/GeyRQpGYfwssgfIyXxYRXn OCC8CTVNRPmgmBLIS5+UclcjLBqlN7IOUyRTVq1GN11g+hS5/erVNMVyCsZCrRNnR2bZcp0tCE6FQ /TRonoQ1rUgPJaOGPiHB/B2VkW6vBoYZBvyZIbWi3e0m8zyUmj05s/d+LyhoqfeuQUO2SCZgqk82I LR6ygXDicMX6k6rEYjJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q2gVI-004EtN-1t; Fri, 26 May 2023 23:05:48 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q2fOs-0043GY-39 for linux-arm-kernel@lists.infradead.org; Fri, 26 May 2023 21:55:08 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-561f6e63decso26142237b3.1 for ; Fri, 26 May 2023 14:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1685138105; x=1687730105; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=o9BuxLyiQzY2TC1wkUXo7pk2ilQpQDkXjoqwEb1YJT0=; b=W4bgolXSBG/aM6AAMIrVWP8PxrTIfod6JPer3GBXCt/gN9PGx6HtMZdQ92CeOZsa0h zto7T/TZcJU13XvCS1fJ3zC6gCHGwi9hu2T0yxjiibFt6RECA9r3Sm8v5SJXfJBG97Ob BCsF752HlXeNrbkdvQt7a8CLZpmFgZXROjXeJJRreDjpnMem33Z1uV3WQBI/0HLWTR0j GXD8vnRftGkrCiB7DlrqDFo03fWiwGOSSE44isOVGB3aRZH9yf0ugO+Rc6OTMgAYVbr6 5W83aTlVpMuuuAGLVnulvKdPmZ2MZOn6osFHjw3ZjUJYvdKSndmvenGnm6z4+pzlL2PS 1drw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685138105; x=1687730105; 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=o9BuxLyiQzY2TC1wkUXo7pk2ilQpQDkXjoqwEb1YJT0=; b=H10ePdVqBC0pHJbTDbZj5M5rPZ2KqxGTWSXL8Kd2FzCdalSejuEa+AtMxDmHzC+cg1 3xXwA11PCrYOtMvpKS8OTVX2+SY+HEnILJFXR2kR93cHEoISok/4vkw0KR+oeZeZuvCN XwJg1NQhI7umGnULqD4G58FuYjvoDLyK7KJy8M6+ztJ4BYJNbx0Pg+G5Cin4cL1uq5c5 0Z1U4w5T+EghmdARshmZriBWamBBHD5Ptou3MYpz+t6GR5unr13tH+6a/TOXYQWo8lPl WerCQptsRcLTTXv8EC83jkoxFqWMaGlaaYbhx5cZf3XBOXNc8a63EuXW1HU9XcKisqSC Ac7w== X-Gm-Message-State: AC+VfDykO0V1hUXsYPKOXoa8C7c90sDPY5iSlnHN+3mwFK0+JE0YGvnS dkqpF2WPllGabiLn3HCoA9FAkmuO9ChD X-Google-Smtp-Source: ACHHUZ53ZLD5rWItTLlXnBT5M5rNiiWHb6EfXc4TAHoG/yypTknS6qdXXrehh+0oWJXgSwo1bZOSR4eZx8H7 X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:3b4e:312c:644:a642]) (user=irogers job=sendgmr) by 2002:a81:d20d:0:b0:561:8fc0:24af with SMTP id x13-20020a81d20d000000b005618fc024afmr1776134ywi.9.1685138105639; Fri, 26 May 2023 14:55:05 -0700 (PDT) Date: Fri, 26 May 2023 14:53:58 -0700 In-Reply-To: <20230526215410.2435674-1-irogers@google.com> Message-Id: <20230526215410.2435674-24-irogers@google.com> Mime-Version: 1.0 References: <20230526215410.2435674-1-irogers@google.com> X-Mailer: git-send-email 2.41.0.rc0.172.g3f132b7071-goog Subject: [PATCH v4 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-20230526_145507_011012_F4BA817C X-CRM114-Status: GOOD ( 12.89 ) 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 Reviewed-by: Kan Liang --- 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;