From patchwork Sat May 27 07:21:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13257560 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 9EC9FC77B7E for ; Sat, 27 May 2023 07:40:50 +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=yCNWUUgvhgwj150rUF2GQjsO04csUvn9rYL+ClEtiFM=; b=R+Lm2As8EQM8xN 99QOwHKeBi6Vdndr+q6cqjg4dS9X6GXRuN6CiBmXJ6pHPy1ET6aifMTzD3nfRHDjaJNBaJWLYRuuu 9vY5cqXfphlqPYWeVGyJdQy3UzyL6t0/tkDpsV5Z37P1jA2egjBgs0OQHjsUiiQRsAOTekkEOwkuQ 1rATSMwGK9z5rLFMxbYU1pjCBDAEHR0aMkdhYjMVeIfn5LXykXD/NSwlvIB+mmQ+SkyaTT2w+/hvS Vq7SbbCmV7B0NJwZHnA0yg22O20TbphPaZZMEzPh4GmD8rPBkBR1FAvdldk4b5Q0Z+VSqilX8Xmyo KlRHA4UIh8qBah1n1I6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q2oXH-0059WJ-1F; Sat, 27 May 2023 07:40:23 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q2oXD-0059TS-30 for linux-arm-kernel@bombadil.infradead.org; Sat, 27 May 2023 07:40:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:To:From:Subject: References:Mime-Version:Message-Id:In-Reply-To:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description; bh=299vrUdS9j5al0BdA54HhQrig6BBYgEJkkDcFDXNhaw=; b=muxWkiROiVBvpWO6REuwftFRkh yJudkoowPtNVEHeADp3nFGcYATyssUAaUt5+k6ZE6uMKg1FTxeP6grkBi7h7J7BskxcKQqYroHtda gQ7kCBMk7I8MXyZZNtnHmKSn2BLF+2AKU1+b+iIiojWHqj89+GM0XJOhW0Sv7ZDf+y6+jACZ/GKEA Ki7zd87GEgsprwAzoEbVsITYjEpZXaJ7ali8LHnZtJOaeN5h/1p4Kv1t9dN5oT86N+ZUe33DHC+hG /rwlqcxOdsD4hFej0k5LDmOhUM58g23V45y5LGUaEpfXfAqSMkTZts+3R19MuuoeP00SG+2ZB2LmX wTEf1PvA==; Received: from mail-pl1-x649.google.com ([2607:f8b0:4864:20::649]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q2oGj-009Lj4-0N for linux-arm-kernel@lists.infradead.org; Sat, 27 May 2023 07:25:42 +0000 Received: by mail-pl1-x649.google.com with SMTP id d9443c01a7336-1ae4a0b5a90so9891765ad.1 for ; Sat, 27 May 2023 00:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1685172186; x=1687764186; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=299vrUdS9j5al0BdA54HhQrig6BBYgEJkkDcFDXNhaw=; b=r4LyMtD8LSxpKizVYzX9CxPB20ywZ+9kDY909fa8pXiGdRPWebOlxQGz2nxywdmJus Uyva4JAp3FWvrY5DSvJl+Umz/SeAaAlVBLpaMwT1xdMfc5EjrqKxEetUM6Yn1cRLvvXW YBQHanwJk+AjeBzNEVEbLlZxzVz0lFGU2z+Oyn2dLqtArW/IB3IGfTcNu9KEumT7kwZH 2FSZ4lzaC1eb+k0RRH+bgtFsiAgjWjN7J+ZNe9McyzNOpOQQwgx//xTv8x+Y4qdrvqE0 Ac7oDFJ9USKScGuAPl1UEqXYQphmzuD8qjkVe6hQ881DrbbXPaefcHAxkGvkj3DcCacO nEog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685172186; x=1687764186; 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=299vrUdS9j5al0BdA54HhQrig6BBYgEJkkDcFDXNhaw=; b=JZcc9SIN3qYBeNmAu7DrhwUoYQYKC88OOPwe+ACjzzqVOXKpwBgLnIpyy8EhKT9oyp 4OdIgrV7atQw0cHMGSNAmB+LeDrknIanTd3ZoLnZ+VC7k61kjQYWYdoS3kPlxOJtaifl JOdRLTjGdxeyqTADBriwWfuHF5oJgucdfcO7LEJ8oWtXH47Js5BEPxWd3iR2jzHS/QIc j5GsZZ3gLVTQnjIMMzFpzD6mGMp2uUu+XM+F/sxcl/6uUR+IsO9KpRgTIW26mcs7XWiA SCuahKq6lkzy9b4qM1khByu4ktrU76b9hVHdx74Ur4KTY1gng6kOzE0ohVDOMk+1y5Ja DFGg== X-Gm-Message-State: AC+VfDyorEe2PUH+DhrqFiTMjyzp8v2PWaePrA0z3gjN3/Z4TYXtl4fF /XLr7EmuAggJhq1WDjPsJ99SWtvPAmWR X-Google-Smtp-Source: ACHHUZ5dZ6hqt7MX6zOuSA8yLL67KYEBhD1h1jlIyT6OGhgGtW3o8/q40j6Lbw4REK1FshcE0vbFduVhLrkO X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:3b4e:312c:644:a642]) (user=irogers job=sendgmr) by 2002:a17:902:7608:b0:1ac:921c:87f6 with SMTP id k8-20020a170902760800b001ac921c87f6mr1284929pll.8.1685172185596; Sat, 27 May 2023 00:23:05 -0700 (PDT) Date: Sat, 27 May 2023 00:21:50 -0700 In-Reply-To: <20230527072210.2900565-1-irogers@google.com> Message-Id: <20230527072210.2900565-15-irogers@google.com> Mime-Version: 1.0 References: <20230527072210.2900565-1-irogers@google.com> X-Mailer: git-send-email 2.41.0.rc0.172.g3f132b7071-goog Subject: [PATCH v5 14/34] perf evlist: Reduce scope of evlist__has_hybrid 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-20230527_082359_373718_ED41EA34 X-CRM114-Status: GOOD ( 15.42 ) 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 Function is only used in printout, reduce scope to stat-display.c. Remove the now empty evlist-hybrid.c and evlist-hybrid.h. Signed-off-by: Ian Rogers Reviewed-by: Kan Liang --- tools/perf/builtin-record.c | 1 - tools/perf/builtin-stat.c | 1 - tools/perf/util/Build | 1 - tools/perf/util/evlist-hybrid.c | 31 ------------------------------- tools/perf/util/evlist-hybrid.h | 12 ------------ tools/perf/util/evlist.c | 1 - tools/perf/util/stat-display.c | 15 ++++++++++++++- 7 files changed, 14 insertions(+), 48 deletions(-) delete mode 100644 tools/perf/util/evlist-hybrid.c delete mode 100644 tools/perf/util/evlist-hybrid.h diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index d80b54a6f450..e30e8d6a6575 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -50,7 +50,6 @@ #include "util/pfm.h" #include "util/clockid.h" #include "util/pmu-hybrid.h" -#include "util/evlist-hybrid.h" #include "util/off_cpu.h" #include "util/bpf-filter.h" #include "asm/bug.h" diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index d414ee30dcf9..62bbeea93bf3 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -48,7 +48,6 @@ #include "util/pmu.h" #include "util/event.h" #include "util/evlist.h" -#include "util/evlist-hybrid.h" #include "util/evsel.h" #include "util/debug.h" #include "util/color.h" diff --git a/tools/perf/util/Build b/tools/perf/util/Build index c146736ead19..21e4cdcba504 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -11,7 +11,6 @@ perf-y += db-export.o perf-y += env.o perf-y += event.o perf-y += evlist.o -perf-y += evlist-hybrid.o perf-y += sideband_evlist.o perf-y += evsel.o perf-y += evsel_fprintf.o diff --git a/tools/perf/util/evlist-hybrid.c b/tools/perf/util/evlist-hybrid.c deleted file mode 100644 index 64f78d06fe19..000000000000 --- a/tools/perf/util/evlist-hybrid.c +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -#include -#include -#include "cpumap.h" -#include "evlist.h" -#include "evsel.h" -#include "../perf.h" -#include "util/pmu-hybrid.h" -#include "util/evlist-hybrid.h" -#include "debug.h" -#include -#include -#include -#include -#include -#include -#include - -bool evlist__has_hybrid(struct evlist *evlist) -{ - struct evsel *evsel; - - evlist__for_each_entry(evlist, evsel) { - if (evsel->pmu_name && - perf_pmu__is_hybrid(evsel->pmu_name)) { - return true; - } - } - - return false; -} diff --git a/tools/perf/util/evlist-hybrid.h b/tools/perf/util/evlist-hybrid.h deleted file mode 100644 index 0cded76eb344..000000000000 --- a/tools/perf/util/evlist-hybrid.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __PERF_EVLIST_HYBRID_H -#define __PERF_EVLIST_HYBRID_H - -#include -#include -#include "evlist.h" -#include - -bool evlist__has_hybrid(struct evlist *evlist); - -#endif /* __PERF_EVLIST_HYBRID_H */ diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 63f8821a5395..82c0b3d0c822 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -28,7 +28,6 @@ #include "util/string2.h" #include "util/perf_api_probe.h" #include "util/evsel_fprintf.h" -#include "util/evlist-hybrid.h" #include "util/pmu.h" #include "util/sample.h" #include "util/bpf-filter.h" diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c index 319f456f0673..4cce7d3c5e52 100644 --- a/tools/perf/util/stat-display.c +++ b/tools/perf/util/stat-display.c @@ -20,7 +20,6 @@ #include "util.h" #include "iostat.h" #include "pmu-hybrid.h" -#include "evlist-hybrid.h" #define CNTR_NOT_SUPPORTED "" #define CNTR_NOT_COUNTED "" @@ -692,6 +691,20 @@ static bool is_mixed_hw_group(struct evsel *counter) return false; } +static bool evlist__has_hybrid(struct evlist *evlist) +{ + struct evsel *evsel; + + evlist__for_each_entry(evlist, evsel) { + if (evsel->pmu_name && + perf_pmu__is_hybrid(evsel->pmu_name)) { + return true; + } + } + + return false; +} + static void printout(struct perf_stat_config *config, struct outstate *os, double uval, u64 run, u64 ena, double noise, int aggr_idx) {