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 970683D4131 for ; Tue, 28 Apr 2026 07:19:34 +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=1777360775; cv=none; b=HO5TDECA3T58nO0Wvy8H2tdjiqrgR/KJrJY98ETefcGcPu13XuYMLuMkljb6H3VM9tV6xTMuDxkH+NGKvHyiHr4iMVckjpScKFBGofn604bX7wTDuWdtK2Cy0Icp10nZ/hXY5JUzYSSJAP7L5ajmn/zWQO5HIO3IkWCKyCEEMOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777360775; c=relaxed/simple; bh=FP5o9n90ZT5agsSGJdl1masLAbe0pH/IJ+EbWllzEcE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=la6B7vIltEMzaYth3wN/RAx0d5TwlMJpmd9ZyCFX9cJl2eum9ghxBHxvggQTz+BTot+BUFTUnVUp+vWBfQE3B9mP95wL3c0A6e2SYbKScJ3KmAjk4k3Yio1mERr/M88NxcGQVxA5cxkmuw74KDFQc044M7oYAI4dznsHRvs+ugk= 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=QiVOse/o; 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="QiVOse/o" Received: by mail-dy1-f202.google.com with SMTP id 5a478bee46e88-2c0f6593ef5so14537810eec.1 for ; Tue, 28 Apr 2026 00:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1777360774; x=1777965574; 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=niT+j+ygae4DUDVZvlLCzSKgJX/QJcllkfXgy9y3G00=; b=QiVOse/oQstoLXsq30rtkbfTzvzEQabM5tRvhUg1kSVpo71h038unqDjWKMBBo/zYX qBQp9Ye1WhkIhiXDmLxuFJHCI0+sFr2B9A0TWua6iVDalbe4aCEYzBaqKhtYMTZAvqnI bb8KvUwOIuRAV71PaRc2VLxiQtFi2XwCOwHA2z+j3usp96oohFL+8SYpkBLDTn14KXaQ aRi1iXr0+uHaTsA0hcMd/MK87mB5andFiKOJaI739dnuw3/9/v7Ay0GmtcsStXzSk8g4 iaC0f8W6CadqNl8rN/VK+AgVNsqlHAfYEEg7XO/6vL9fAxAtW1CuwLGDScyzRoaAc/Q0 p0Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777360774; x=1777965574; 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=niT+j+ygae4DUDVZvlLCzSKgJX/QJcllkfXgy9y3G00=; b=JrIcJ8QUbGVavcCP70es6f4zioysiFDttk+Z3iaD50EMKt0pyrSGai/0AZILlVWWEF JF8ncjhnoCUfpRw6FKiWiP550SDvsf/tgtW7vfaIbmfS0t7iFSNrUKAclRlkFw8oqJLA AGjrkM9HU/Lqaz2uxdg+lzlwg1Jl3sPREYlWN++wL2CRnVlaekUXoc2o81Y/GupeylFO hm5veazVbrzfn3O13UKyr7KbEWESBTP2csalS4tkg6NRCYq74X0dp9kgSeG9uwDiwRfF WsFEnN0SKYVreSVAMrv5vwoBQ7i/OkGcxNnerog4gY+bA2SiTeKSu7qTkgw0+WvkbsD+ dSbA== X-Forwarded-Encrypted: i=1; AFNElJ/oeua4bUDBkD9vcWYwUGzO6rWZFOe7xkS/1f9Uxl5UGCOs6sNKe0+pIi3wfcbhUkYhrdzHjm50wV7cO+8=@vger.kernel.org X-Gm-Message-State: AOJu0Yx2sVzJsKt+/CcpRVanTG/FSMUsbKUTSJQtxJQ856eEKKJxTw6K AJchF10ZTey5QUjJWDPlp9CO4Z+Jg2+WR/oBPFkwtM2uUcaDz53yl2WabShNvV0sW1Lnek+oqOo 8v6g1aiT5+A== X-Received: from dlae27.prod.google.com ([2002:a05:701b:231b:b0:12d:b86f:f7a6]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:439d:b0:12b:ebc9:2464 with SMTP id a92af1059eb24-12ddd98e9f7mr774500c88.22.1777360773119; Tue, 28 Apr 2026 00:19:33 -0700 (PDT) Date: Tue, 28 Apr 2026 00:18:12 -0700 In-Reply-To: <20260428071903.1886173-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: <20260425224951.174663-1-irogers@google.com> <20260428071903.1886173-1-irogers@google.com> X-Mailer: git-send-email 2.54.0.545.g6539524ca2-goog Message-ID: <20260428071903.1886173-8-irogers@google.com> Subject: [PATCH v8 07/58] perf evsel/evlist: Avoid unnecessary #includes From: Ian Rogers To: acme@kernel.org, namhyung@kernel.org Cc: adrian.hunter@intel.com, alice.mei.rogers@gmail.com, dapeng1.mi@linux.intel.com, james.clark@linaro.org, leo.yan@linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, tmricht@linux.ibm.com, Ian Rogers 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.545.g6539524ca2-goog