From patchwork Wed May 24 22:18:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13254579 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 146CAC77B7C for ; Wed, 24 May 2023 22:42:07 +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=N3n8VVie8Pjeb/oU6iFbUapNY7n4/u89kBQlugYfaOE=; b=Wu2td2UlJpXZRy tqXWKCDdoabLN00Dr6D7oF909b4ca1a8ENHDZ9H4akNJ9Auw1OlQAnWmNP9BJR2z7i1SdBNpmieJp Hy/xWVTNO9TytAOmjhyWwJzoJxN8SuFWxtvGvDl5qvhn6fVw6yufxgEKsKF0C6RAGVwM8xvuG0fc0 HACiL4VFAhykMXLJkmr9I/Tdp3qDpu+8XQ8MhlQa1pS+Fib6xj6LCBG6JhtoElJ7Atk/4idbLL7/8 G3xcj277RRmt8nYkNmoR2HIRLfD11ca7AxgHVN01txcioLP9/kSY+DJNIni14uuLNNV98RZCIwa1/ twWLL9U3YV1g8pJde2sQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1xAs-00EpkL-0e; Wed, 24 May 2023 22:41:42 +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 1q1xAm-00EpgW-1p for linux-arm-kernel@bombadil.infradead.org; Wed, 24 May 2023 22:41:36 +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=2Ev/Umag+1kF8B15W9g1QM1ZWvuEFBejQXrwI+WR21A=; b=DokcVsnK5KZpwpE+Z+pzjrlRru pCFqP0uqzbLnz1QKugICKl+3+WK5fwSpj/9ABAvg6wbcGfEc8IXiEUkmGVP5Om4xfUxF6DXWAQus7 DZF+XTzh0ZGgUsF94GQGo4RMTISMEbg6acc25slDMnGXVvP1P85O+MXh4jSH6rITKUWVhc99m6cDU Qwg3e4xDBNplr0BOKJtBlK5loa7wt6wwmCJpNa/sL5mNBMSaYlbdd8+4fu5HRgmsDQTHrztEs8kAK BqvaKo6s2dFHbzJoYPx9nv1rkFbXks1gJ8/QKRJdHmF5EhPxjPcqUc1aApoG1GABJ1DPvHpo7l12t 5ZqPoisg==; Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1wp5-0056eh-1p for linux-arm-kernel@lists.infradead.org; Wed, 24 May 2023 22:19:22 +0000 Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-ba2b9ecfadaso3099964276.2 for ; Wed, 24 May 2023 15:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1684966750; x=1687558750; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=2Ev/Umag+1kF8B15W9g1QM1ZWvuEFBejQXrwI+WR21A=; b=JMsQYU8+yomo5jSbLSRJBjA6TPdzXTPm3ryzbqOjQ7HfpZVXJADxYoGFbCtFk2p9Ac gy8yeurv+ybzg2s44BB3EsfcuBqOuGvKxjI8UJZPLDGzJrSIS4j/BEF4MDpDrDAPg+6X WAwALlGobCGXKvC7SSI6X0v6yzULWHrch28mGvGXl3LdL3lrRMLTeHJ+Sj1TC2z+ZEji zOr13lKE/zy/d0IxU6HRONlAsH28ebWFz+xOHSaANWq1uiZQWhWvhS36+N2LGaSTk/kG k4WpRB3sTmDGcH0Vvk9niZDX3o9VTdPtrhZD2kBb6iuaFfoMpJBP4Q9yZvOfdRPq8n5x LG2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684966750; x=1687558750; 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=2Ev/Umag+1kF8B15W9g1QM1ZWvuEFBejQXrwI+WR21A=; b=OLhQTor8Un7kV7v282EQGiD7hajHkYlgrXPqMCCJ4cwKkIwuWZ6MEAgqsVH/MEWvRD WpoLJwHh7boT5I7DRcA6vCKV5ufiOX1GkihyLv84vOWcaWS20drXXLwgzhAyPZuiQdBV 91TJKh+XYmXgmfYd283LRvPdObcNiFy3a5HU1zoR2TpEpRxOrV2YXFuQ6/qIcHrvb/zV AG97rN0P/YMEFKrPbAp/ycKvBBHeSxqyM/+jvaks7Gtt+t5fuARg48dBJN4wK9F1+BLi OJnDCJrRNLBpNQp3JDCAso1bcxhSIUgQhhJqI2iz87wNwsR75iHbP19/dqmrSfZlSq4X wZSQ== X-Gm-Message-State: AC+VfDx58nqMaq8Qdx1r2XOkGP6FSgldot2zhUF51Imz0cwfVuAYCty1 VD69XtCgkkWeeAefvzmKOvWvRprolmSo X-Google-Smtp-Source: ACHHUZ6nk7KPim+zmUUj154fvDJHp2Oy0J25GAXFhwzJha51YxFfXSRvFi9Uiblj4LbpUvvE76tjnkiiTBt1 X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:7aa7:3d2d:76ae:8e96]) (user=irogers job=sendgmr) by 2002:a25:aacc:0:b0:ba8:757c:2523 with SMTP id t70-20020a25aacc000000b00ba8757c2523mr797390ybi.9.1684966749986; Wed, 24 May 2023 15:19:09 -0700 (PDT) Date: Wed, 24 May 2023 15:18:11 -0700 In-Reply-To: <20230524221831.1741381-1-irogers@google.com> Message-Id: <20230524221831.1741381-16-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 15/35] 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-20230524_231913_777657_A753BE98 X-CRM114-Status: GOOD ( 16.32 ) 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 --- 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 cc4d96de1851..3b90d742b023 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 bf5a6c14dfcd..ede0477d958a 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 "" @@ -677,6 +676,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) {