From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f201.google.com (mail-dy1-f201.google.com [74.125.82.201]) (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 A3FFA33D4FD for ; Thu, 23 Apr 2026 03:55:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776916557; cv=none; b=WyARlnwJ3hQcf0DipcGubuQOPuLsi4MvxeNjbNf/219c3QEmIxJGzVIpD5rEKB8uQ2jPKKo5KGfUSO9aDZ+7mwfbqKU/qkyFJVaQt3NCP+AX2xbLB8OPo8ajGBuBDEeIBivGc+xUCM+RpPcNkxajL/dcHvml/tqMPlHFYWgXalM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776916557; c=relaxed/simple; bh=9QVIDwFrRipr23FnuY9aTJD6UPXAMm6bbw3zj19BRdQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=s1N0atViVVP+41vmKG5zSQVfdwgebSFXsQ4scPo+X3BD4fvmhXduwVbwGE9r0lqCIrS4E/TVP54BddHCp4tYX6plr47/718rk6ZnLmOPw40EWKYM/JURcZnCr61pbDpDDlqbRYisQjxugfw3OuRC/dJeMyRF4yLmZmky+el+bhA= 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=QdizeG0j; arc=none smtp.client-ip=74.125.82.201 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="QdizeG0j" Received: by mail-dy1-f201.google.com with SMTP id 5a478bee46e88-2ddd8ef5343so5808917eec.1 for ; Wed, 22 Apr 2026 20:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1776916554; x=1777521354; 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=NWeBiWGpevte4iUvIVtyBuQo4qdnnAREZFJd51szFgM=; b=QdizeG0jNBG3AxZfoAjSWewEBj2LF9sg8Uysw8ytvMoOtAfXBbt5H6dI0wIPNokk8q Zt8sePz9b6jR6CcCqkH5jqtmbSq5OdJdFoGMoc+18mBpVu4TbvdPaIq9EBFIrIzsLP30 YUEZtczED63i7nTiLbVAJZM0mWbWG3n+D0YYjJ96bo0LuVVvyEpQjq8asBm//Iuj9QAx Btuk+xrK8Mv9UrQ9e6gqUisAGgx9piqaHhIbDOv3b/WgzwJOEC2wl0ZjkTlHdZ31vOPR NsmhG5cBL3D7dk+nIdoGgww61ZYgMP5NsLKG16F8YCth8Ajp0nVrvWI8KGSyBh4zcgxA uhAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776916554; x=1777521354; 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=NWeBiWGpevte4iUvIVtyBuQo4qdnnAREZFJd51szFgM=; b=WG2vz4M/kbBWPk8VLMXAKfOA30/pgi+t1hgaAjydSiOsyUkpIfaztvx+NaGxT8VFQW qlGp7Hf6qqB4vvMPQdIry+QIpTwQYoCTXxysqBPzI4x/DiD6jRe5k8g0/eMbiL3ivopA 3J87S8qeXc44Edpu4ik4Oi4Y3dwg7btJNpMtNvlqlqHmAA6O/kH1j6oT56g2tzcwVQcb 8VueimEwwWjTYTXbAxeNozlkhROFpW+ll5YZfU8vhKWODabj+3WXTaSBannfs+M4cxh6 h1B7KdAvvpF88YPB8R/2VlBTk2cywSEtlLEzUmkGOl2TRXnUtlhfZxKOUA1rFMGuKmEq YhXQ== X-Forwarded-Encrypted: i=1; AFNElJ/Mi3Hxkl5wT0W8dRyhOaMrcv6MABWf50xHfSfyRNhJAi5FagsTb7D8PJDxCmSoPMdD6ahhGVuLjnaIs8jNEIIt@vger.kernel.org X-Gm-Message-State: AOJu0YyK/U5t4f6wQqRExnNH+dxvUu2ZTao7XIqW1OOaBr0DUXqQN9mu uwkOufHJYP1bau4yTHDeyiRvrAvimonXMhkOytpjeBs42EbrDmCc4hiJaNdX7z2J4dUYisDpP/8 wVmkvphCq8g== X-Received: from dlbrh5.prod.google.com ([2002:a05:7022:f305:b0:12c:4c5f:243d]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:2213:b0:128:cf80:deea with SMTP id a92af1059eb24-12c73f697edmr13037900c88.1.1776916553411; Wed, 22 Apr 2026 20:55:53 -0700 (PDT) Date: Wed, 22 Apr 2026 20:54:35 -0700 In-Reply-To: <20260423035526.1537178-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260419235911.2186050-27-irogers@google.com> <20260423035526.1537178-1-irogers@google.com> X-Mailer: git-send-email 2.54.0.rc2.533.g4f5dca5207-goog Message-ID: <20260423035526.1537178-9-irogers@google.com> Subject: [PATCH v2 08/58] perf evsel/evlist: Avoid unnecessary #includes From: Ian Rogers To: irogers@google.com, acme@kernel.org, adrian.hunter@intel.com, james.clark@linaro.org, leo.yan@linux.dev, namhyung@kernel.org, tmricht@linux.ibm.com Cc: 9erthalion6@gmail.com, adityab1@linux.ibm.com, alexandre.chartre@oracle.com, alice.mei.rogers@gmail.com, ankur.a.arora@oracle.com, ashelat@redhat.com, atrajeev@linux.ibm.com, blakejones@google.com, changbin.du@huawei.com, chuck.lever@oracle.com, collin.funk1@gmail.com, coresight@lists.linaro.org, ctshao@google.com, dapeng1.mi@linux.intel.com, derek.foreman@collabora.com, dsterba@suse.com, gautam@linux.ibm.com, howardchu95@gmail.com, john.g.garry@oracle.com, jolsa@kernel.org, jonathan.cameron@huawei.com, justinstitt@google.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, mike.leach@arm.com, mingo@redhat.com, morbo@google.com, nathan@kernel.org, nichen@iscas.ac.cn, nick.desaulniers+lkml@gmail.com, pan.deng@intel.com, peterz@infradead.org, ravi.bangoria@amd.com, ricky.ringler@proton.me, stephen.s.brennan@oracle.com, sun.jian.kdev@gmail.com, suzuki.poulose@arm.com, swapnil.sapkal@amd.com, tanze@kylinos.cn, terrelln@fb.com, thomas.falcon@intel.com, tianyou.li@intel.com, tycho@kernel.org, wangyang.guo@intel.com, xiaqinxin@huawei.com, yang.lee@linux.alibaba.com, yuzhuo@google.com, zhiguo.zhou@intel.com, zli94@ncsu.edu Content-Type: text/plain; charset="UTF-8" Use forward declarations and remove unnecessary #includes in evsel.h. Sort the forward declarations in evsel.h and evlist.h. Signed-off-by: Ian Rogers --- tools/perf/util/evlist.h | 15 +++++++++------ tools/perf/util/evsel.h | 20 +++++++++++--------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index e507f5f20ef6..e54761c670b6 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -2,29 +2,32 @@ #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 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.rc2.533.g4f5dca5207-goog