From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f202.google.com (mail-dy1-f202.google.com [74.125.82.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A64F32E151 for ; Sun, 19 Apr 2026 23:59:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776643181; cv=none; b=PgKIfe+I3mfPNtIOtxJ3B8tf5Fk6Fpwawi5t+yXIvYEIRMmDyrxlqFkLQACbiv3+37IL52TANVF12Avoffn9ZIwNifw0Y5UYODymy7pjtMFk7LzXwVPP4v1AjiQ3prMGEb9gnHmdzhgNhbsZ+1cz8gSnEpHIUNlI6JSzLFO3Up8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776643181; c=relaxed/simple; bh=6E58m9InAH+DCu+ZA8PnRuDlU1ObuG7EazqtVs5Nr4Q=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=hvbZVbgPgT+F7KtJKWKHPVsG9EQebk2KMUXN6XVqcoyWrfWHBviBssrRYCVMbzbwPctIbS7DlLFxk0zjs404VizpMEWa4hqQvNW4pca/4hISRblmKWAyK1vmXV1um1iDxwkbk/vFBxVHDB/9zDkupeArxR34g9VCSjLj124ZBoU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ctKWoCCo; arc=none smtp.client-ip=74.125.82.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ctKWoCCo" Received: by mail-dy1-f202.google.com with SMTP id 5a478bee46e88-2c16233ee11so3408975eec.1 for ; Sun, 19 Apr 2026 16:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1776643179; x=1777247979; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=3yAm7useIIj3mEDGXFjVTF11+L984iEVD8BtVUzQIp8=; b=ctKWoCCoADJ6/0kCx3FAGUpARqd3R5wxElXx554h2k+mbPrEWfmuUE6dB0At/ZvDfZ Nl2RqsIWVpBWzpexwXuK1ldgiGn4LYBmrLfvfyS+09mF9Apf6JbrDVyfKP+h2Ix3Gam2 qhAJUPKXyMTi27hOdHXr7ULJdn90jGlWj8jd5gFWDEu/N1mks9lraZzKviltruKBOu+c ylemSyiu8BsmfmwwAiZiAaUvVZZRFiRjLScChOnj+sowGxvpTPqatyIl8PR3KqxinwhN Ng9LjBXL8uI8g/5g/HSs/boqFLoe2msdPb3PIAprZ5j5NHWOTZoctnyzXclOpsrSir0g n1ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776643179; x=1777247979; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3yAm7useIIj3mEDGXFjVTF11+L984iEVD8BtVUzQIp8=; b=mj+dqrcusc/Ztu12U9fwZhc9E+tB3JUToq7t87vZ8vkuzAIcCZxf6n73CHKLP6OWws QkdGgpMW2HJdh6m52EIp0J43hnVlV0KvThQx3MeiQomXCgl46/KaNs7aPPoXSCgj411N lTrK+KwPPnlU0G96qsXjGoRJHw/6ND9SvmXSSX1uCKPIkkU4zsdKUNZIp8o63arrHJWD 9rEZLIfZLp0MOL5p7SzOm8M3epBIxYxzBmAiZ4iolbJEr5xeuRx1ElLVewlYFJvIGWD4 4d17oESj4WhkRokWn3TQev3QQM1SR3BQey1H63YOdl9acAn84lMgsdBZBZluAp5UWrVA fwpw== X-Forwarded-Encrypted: i=1; AFNElJ+jXkhDjErenx8MhlgmGGDaotc+wDIsDm+tz4sg0inIlFCbrtjxI6ePaUHy/CVMTAeeRJsZIqTcPLYih5o=@vger.kernel.org X-Gm-Message-State: AOJu0YyEYDH9nls+C+sPRsaRqJopuW8428a45eSZrc7HvMVg3fwvpPt+ 6xLTN4n9UAgQcVeuJiZwuuLSspw1MYdHrH3pIvurfTefRoOB5sNvL7lwn6tivHeGKNyydzrfqNy kESoSe3QbHA== X-Received: from dybb17.prod.google.com ([2002:a05:693c:6091:b0:2d6:2fd7:91f8]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7301:4083:b0:2d8:b1ce:d3d8 with SMTP id 5a478bee46e88-2e4526dd448mr4946565eec.0.1776643178791; Sun, 19 Apr 2026 16:59:38 -0700 (PDT) Date: Sun, 19 Apr 2026 16:58:20 -0700 In-Reply-To: <20260419235911.2186050-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260419235911.2186050-1-irogers@google.com> X-Mailer: git-send-email 2.54.0.rc1.513.gad8abe7a5a-goog Message-ID: <20260419235911.2186050-9-irogers@google.com> Subject: [PATCH v1 08/58] perf evsel/evlist: Avoid unnecessary #includes From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Jiri Olsa , Adrian Hunter , James Clark , Alice Rogers , Suzuki K Poulose , Mike Leach , John Garry , Leo Yan , Yicong Yang , Jonathan Cameron , Nick Terrell , David Sterba , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Alexandre Chartre , Dmitrii Dolgov <9erthalion6@gmail.com>, Yuzhuo Jing , Blake Jones , Changbin Du , Gautam Menghani , Wangyang Guo , Pan Deng , Zhiguo Zhou , Tianyou Li , Thomas Falcon , Athira Rajeev , Collin Funk , Dapeng Mi , Ravi Bangoria , Zecheng Li , tanze , Thomas Richter , Ankur Arora , "Tycho Andersen (AMD)" , Howard Chu , Sun Jian , Derek Foreman , Swapnil Sapkal , Anubhav Shelat , Ricky Ringler , Qinxin Xia , Aditya Bodkhe , Chun-Tse Shao , Stephen Brennan , Yang Li , Chuck Lever , Chen Ni , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org Cc: Ian Rogers Content-Type: text/plain; charset="UTF-8" Use forward declarations and remove unnecessary #includes in evsel.h and evlist.h. Sort the forward declaration.s Signed-off-by: Ian Rogers --- tools/perf/util/evlist.h | 16 ++++++++++------ tools/perf/util/evsel.h | 20 +++++++++++--------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index e507f5f20ef6..69784787da48 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -2,29 +2,33 @@ #ifndef __PERF_EVLIST_H #define __PERF_EVLIST_H 1 +#include + #include #include -#include #include +#include +#include +#include + #include #include #include #include + #include "affinity.h" #include "events_stats.h" #include "evsel.h" #include "rblist.h" -#include -#include -#include -struct pollfd; -struct thread_map; +struct evsel; struct perf_cpu_map; struct perf_stat_config; +struct pollfd; struct record_opts; struct strbuf; struct target; +struct thread_map; /* * State machine of bkw_mmap_state: diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 339b5c08a33d..b099c8e5dd86 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -2,28 +2,30 @@ #ifndef __PERF_EVSEL_H #define __PERF_EVSEL_H 1 -#include #include -#include + +#include #include #include +#include + #include #include + #include "symbol_conf.h" -#include "pmus.h" -#include "pmu.h" +struct bperf_follower_bpf; +struct bperf_leader_bpf; +struct bpf_counter_ops; struct bpf_object; struct cgroup; +struct hashmap; struct perf_counts; +struct perf_pmu; struct perf_stat_config; struct perf_stat_evsel; -union perf_event; -struct bpf_counter_ops; struct target; -struct hashmap; -struct bperf_leader_bpf; -struct bperf_follower_bpf; +union perf_event; typedef int (evsel__sb_cb_t)(union perf_event *event, void *data); -- 2.54.0.rc1.513.gad8abe7a5a-goog