From nobody Mon Feb 9 07:21:52 2026 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.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 4099A2FB602 for ; Wed, 29 Oct 2025 05:34:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761716070; cv=none; b=oPa3+77caKD/y9rD+3fkwrQ9PomXcm4MsNpACwYuANTn03RMI4Nd0EO+fdT1MViesFhIKVZQ1kHj9YZ2DFD4z0+JNzH8nf7MJwbelK2XFJs01xwuL1qV4P7dx6lnzRghKebegnu0fEXhcA+cT/fglRSY7RYfofcCBbMzPu59ALY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761716070; c=relaxed/simple; bh=RCOWYW0eWdVan8nSdNr58xSEWGyXHpqrK98TvRvgRaI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=JMM8w0/dYiV1sL33egUR75HvpGIzGok3+YqKOP4ZK86Lx4YbA63kyo7We7q09DG+ouvM3oMpHSu0y3GNQ2/+mPy5IQ06TqV78v2qVMAJFga4MZWVoFDYhX6Is2cwC0EFAlDJytP4Dtxb9+vRoOFce/qd09+EqPtp7OQGWAI4Ifk= 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=XL6z7IoN; arc=none smtp.client-ip=209.85.128.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="XL6z7IoN" Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-78103962c97so71895847b3.0 for ; Tue, 28 Oct 2025 22:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1761716067; x=1762320867; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=THSPkwfdbOYwyEt2kIyr7orJhsGJmegrl3TMMEOJz4M=; b=XL6z7IoNE9pixp20OYkuIjGlaEAuHfUOuw4HLQsQGCmmd6aTtxBKTzYJjnGiKJ5ocT yem2GuD4ypEaK2r3yYabJi5LVMyQ1Y2mWu5NUAJKgRfIIjPqkBOvkdfY8mWG3YY9BoBr NgpYeukZHvEblIyvZKuzT9Pa/0MVJoXFgGRWjB0GAdYZ6PQQ7S+5AhFak4fz5e3q6gCF vzfqkcx8aZWRDpkKH+UYpHdASAOyufCAFYUwgWokO9HupOxZ9ZAQkagLoSUH66oqRdJJ EVBxSUqFYvpEtpR1UcwezEQaYc6i7btMnMG8axHXogvJfHmogbTXvJsjhIDQSsIAkr4A 1elg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761716067; x=1762320867; h=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=THSPkwfdbOYwyEt2kIyr7orJhsGJmegrl3TMMEOJz4M=; b=X+p/MsFJsK2OSs0Lw2cBya0IW0uVEm2GNjUMkbSY4fMnWMEz0H8bzKn4DUDnOJOaro LJ7RgYkgEsX3XRnlNjYzCrYlgQROk6nmF/+p2eBuKAquJILX6gGaW3EGza7GjwcGJcis tE+sytBIrD6R/aAhJF9Ki8o+qN9GiWMiBQRAjb9qb5cYAVIw8tS3XYj6TTwxSnja0CTO 2xOf3F7AzMMMrprXie4rQfZ3koaaoAEEfY7QqxXG2TjQGn0pBz9S/9T+lutmeMDol7pS Cglu3GgmVA0g1k0H/5dCDq9NzOreXJDdWldHE32VGlGD3243/fehE/y6dYvxcr+yK0tE i/vg== X-Forwarded-Encrypted: i=1; AJvYcCUQRB58tC6eoHO5Q+7wwaQkdPnU/IqphmTHyDutChuBMKtmV1m57aXANhnOV3BqGcMEbVZzKsOk621lAcI=@vger.kernel.org X-Gm-Message-State: AOJu0YxHMqshH6Oe3XhkJpON1CFGoGD2XALb4cb6kz7jiKfSXGhtkD6R AWiZSnmEwEDm1qtgsDM+CGq4tN5lCq7awnCNn/SntSku/JsuGgfKOf15vFc9K+egXrt/zmNDbCi +UxOVJYstig== X-Google-Smtp-Source: AGHT+IHO5ntVJHgND97kqmZAzJ3mDz13n7CAuE5Jwt6yaOfFz/tSrxBkFQnE5UX83bEG1um2uV9otIRx1dPA X-Received: from ywbik2.prod.google.com ([2002:a05:690c:4a02:b0:783:777f:c91f]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:690c:23c6:b0:781:c87:c2fe with SMTP id 00721157ae682-78628fd908dmr17341407b3.56.1761716067252; Tue, 28 Oct 2025 22:34:27 -0700 (PDT) Date: Tue, 28 Oct 2025 22:34:03 -0700 In-Reply-To: <20251029053413.355154-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: <20251029053413.355154-1-irogers@google.com> X-Mailer: git-send-email 2.51.1.851.g4ebd6896fd-goog Message-ID: <20251029053413.355154-6-irogers@google.com> Subject: [RFC PATCH v1 05/15] perf util: Sort includes and add missed explicit dependencies From: Ian Rogers To: Suzuki K Poulose , Mike Leach , James Clark , John Garry , Will Deacon , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Greg Kroah-Hartman , Charlie Jenkins , Thomas Falcon , Yicong Yang , Thomas Richter , Athira Rajeev , Howard Chu , Song Liu , Dapeng Mi , Levi Yun , Zhongqiu Han , Blake Jones , Anubhav Shelat , Chun-Tse Shao , Christophe Leroy , Jean-Philippe Romain , Gautam Menghani , Dmitry Vyukov , Yang Li , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Andi Kleen , Weilin Wang Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix missing includes found while cleaning the evsel/evlist header files. Sort the remaining header files for consistency with the rest of the code. Signed-off-by: Ian Rogers --- tools/perf/util/bpf_off_cpu.c | 28 ++++++----- tools/perf/util/bpf_trace_augment.c | 7 +-- tools/perf/util/evlist.c | 78 ++++++++++++++--------------- tools/perf/util/evsel.c | 77 ++++++++++++++-------------- tools/perf/util/map.h | 6 +-- tools/perf/util/perf_api_probe.c | 17 ++++--- tools/perf/util/s390-sample-raw.c | 15 +++--- tools/perf/util/stat-shadow.c | 1 + tools/perf/util/stat.c | 15 +++--- 9 files changed, 127 insertions(+), 117 deletions(-) diff --git a/tools/perf/util/bpf_off_cpu.c b/tools/perf/util/bpf_off_cpu.c index 88e0660c4bff..707ab14aa4ca 100644 --- a/tools/perf/util/bpf_off_cpu.c +++ b/tools/perf/util/bpf_off_cpu.c @@ -1,22 +1,24 @@ // SPDX-License-Identifier: GPL-2.0 -#include "util/bpf_counter.h" -#include "util/debug.h" -#include "util/evsel.h" -#include "util/evlist.h" -#include "util/off_cpu.h" -#include "util/perf-hooks.h" -#include "util/record.h" -#include "util/session.h" -#include "util/target.h" -#include "util/cpumap.h" -#include "util/thread_map.h" -#include "util/cgroup.h" -#include "util/strlist.h" #include #include #include #include =20 +#include "bpf_counter.h" +#include "cgroup.h" +#include "cpumap.h" +#include "debug.h" +#include "evlist.h" +#include "evsel.h" +#include "off_cpu.h" +#include "parse-events.h" +#include "perf-hooks.h" +#include "record.h" +#include "session.h" +#include "strlist.h" +#include "target.h" +#include "thread_map.h" + #include "bpf_skel/off_cpu.skel.h" =20 #define MAX_STACKS 32 diff --git a/tools/perf/util/bpf_trace_augment.c b/tools/perf/util/bpf_trac= e_augment.c index 56ed17534caa..c2d502c1c358 100644 --- a/tools/perf/util/bpf_trace_augment.c +++ b/tools/perf/util/bpf_trace_augment.c @@ -1,9 +1,10 @@ #include #include =20 -#include "util/debug.h" -#include "util/evlist.h" -#include "util/trace_augment.h" +#include "debug.h" +#include "evlist.h" +#include "parse-events.h" +#include "trace_augment.h" =20 #include "bpf_skel/augmented_raw_syscalls.skel.h" =20 diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index e8217efdda53..d99a3f12606f 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -5,66 +5,66 @@ * Parts came from builtin-{top,stat,record}.c, see those files for further * copyright notes. */ -#include #include +#include #include #include -#include "cpumap.h" -#include "util/mmap.h" -#include "thread_map.h" -#include "target.h" -#include "evlist.h" -#include "evsel.h" -#include "record.h" -#include "debug.h" -#include "units.h" -#include "bpf_counter.h" -#include // page_size -#include "affinity.h" -#include "../perf.h" -#include "asm/bug.h" -#include "bpf-event.h" -#include "util/event.h" -#include "util/string2.h" -#include "util/perf_api_probe.h" -#include "util/evsel_fprintf.h" -#include "util/pmu.h" -#include "util/sample.h" -#include "util/bpf-filter.h" -#include "util/stat.h" -#include "util/util.h" -#include "util/env.h" -#include "util/intel-tpebs.h" -#include "util/metricgroup.h" -#include "util/strbuf.h" -#include -#include #include +#include #include - -#include "parse-events.h" -#include - -#include #include #include #include #include #include +#include =20 +#include +#include // page_size +#include #include +#include #include #include -#include #include #include #include +#include #include #include -#include #include +#include + +#include "../perf.h" +#include "affinity.h" +#include "asm/bug.h" +#include "bpf-event.h" +#include "bpf_counter.h" +#include "cpumap.h" +#include "debug.h" +#include "evlist.h" +#include "evsel.h" +#include "parse-events.h" +#include "record.h" +#include "target.h" +#include "thread_map.h" +#include "units.h" +#include "bpf-filter.h" +#include "env.h" +#include "event.h" +#include "evsel_fprintf.h" +#include "intel-tpebs.h" +#include "metricgroup.h" +#include "mmap.h" +#include "perf_api_probe.h" +#include "pmu.h" +#include "pmus.h" +#include "sample.h" +#include "stat.h" +#include "strbuf.h" +#include "string2.h" +#include "util.h" =20 -#include =20 #ifdef LACKS_SIGQUEUE_PROTOTYPE int sigqueue(pid_t pid, int sig, const union sigval value); diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index ad11cbfcbff1..6769cd27b6e4 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -12,66 +12,67 @@ #define __SANE_USERSPACE_TYPES__ =20 #include +#include #include #include -#include +#include +#include +#include +#include +#include + #include #include -#include -#include +#include +#include +#include +#include #include +#include #include +#include +#include #include -#include -#include -#include -#include -#include -#include +#include #include + +#include "../perf-sys.h" #include "asm/bug.h" +#include "bpf-filter.h" #include "bpf_counter.h" #include "callchain.h" #include "cgroup.h" #include "counts.h" +#include "debug.h" +#include "drm_pmu.h" +#include "env.h" #include "event.h" -#include "evsel.h" -#include "time-utils.h" -#include "util/env.h" -#include "util/evsel_config.h" -#include "util/evsel_fprintf.h" #include "evlist.h" -#include -#include "thread_map.h" -#include "target.h" +#include "evsel.h" +#include "evsel_config.h" +#include "evsel_fprintf.h" +#include "hashmap.h" +#include "hist.h" +#include "hwmon_pmu.h" +#include "intel-tpebs.h" +#include "memswap.h" +#include "off_cpu.h" +#include "parse-branch-options.h" #include "perf_regs.h" +#include "pmu.h" +#include "pmus.h" #include "record.h" -#include "debug.h" -#include "trace-event.h" +#include "rlimit.h" #include "session.h" #include "stat.h" #include "string2.h" -#include "memswap.h" -#include "util.h" -#include "util/hashmap.h" -#include "off_cpu.h" -#include "pmu.h" -#include "pmus.h" -#include "drm_pmu.h" -#include "hwmon_pmu.h" +#include "target.h" +#include "thread_map.h" +#include "time-utils.h" #include "tool_pmu.h" #include "tp_pmu.h" -#include "rlimit.h" -#include "../perf-sys.h" -#include "util/parse-branch-options.h" -#include "util/bpf-filter.h" -#include "util/hist.h" -#include -#include -#include -#include "util/intel-tpebs.h" - -#include +#include "trace-event.h" +#include "util.h" =20 #ifdef HAVE_LIBTRACEEVENT #include diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h index 979b3e11b9bc..7cd5188fe628 100644 --- a/tools/perf/util/map.h +++ b/tools/perf/util/map.h @@ -2,13 +2,11 @@ #ifndef __PERF_MAP_H #define __PERF_MAP_H =20 -#include -#include -#include -#include #include #include #include + +#include #include #include =20 diff --git a/tools/perf/util/perf_api_probe.c b/tools/perf/util/perf_api_pr= obe.c index 6ecf38314f01..3345145a9307 100644 --- a/tools/perf/util/perf_api_probe.c +++ b/tools/perf/util/perf_api_probe.c @@ -1,13 +1,16 @@ /* SPDX-License-Identifier: GPL-2.0 */ +#include =20 -#include "perf-sys.h" -#include "util/cloexec.h" -#include "util/evlist.h" -#include "util/evsel.h" -#include "util/parse-events.h" -#include "util/perf_api_probe.h" #include -#include + +#include "cloexec.h" +#include "evlist.h" +#include "evsel.h" +#include "parse-events.h" +#include "perf-sys.h" +#include "perf_api_probe.h" +#include "pmu.h" +#include "pmus.h" =20 typedef void (*setup_probe_fn_t)(struct evsel *evsel); =20 diff --git a/tools/perf/util/s390-sample-raw.c b/tools/perf/util/s390-sampl= e-raw.c index 335217bb532b..a2d6a1f93cce 100644 --- a/tools/perf/util/s390-sample-raw.c +++ b/tools/perf/util/s390-sample-raw.c @@ -12,21 +12,22 @@ * sample was taken from. */ =20 -#include +#include #include #include -#include +#include =20 -#include -#include #include +#include +#include =20 +#include "color.h" #include "debug.h" -#include "session.h" #include "evlist.h" -#include "color.h" -#include "sample-raw.h" +#include "pmus.h" #include "s390-cpumcf-kernel.h" +#include "sample-raw.h" +#include "session.h" #include "util/pmu.h" #include "util/sample.h" =20 diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index abaf6b579bfc..3588b469de9d 100644 --- a/tools/perf/util/stat-shadow.c +++ b/tools/perf/util/stat-shadow.c @@ -6,6 +6,7 @@ #include "color.h" #include "debug.h" #include "pmu.h" +#include "pmus.h" #include "rblist.h" #include "evlist.h" #include "expr.h" diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index 101ed6c497bc..c1c44c417c93 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -1,21 +1,24 @@ // SPDX-License-Identifier: GPL-2.0 #include -#include #include #include #include + +#include +#include + #include "counts.h" #include "cpumap.h" #include "debug.h" +#include "evlist.h" +#include "evsel.h" +#include "hashmap.h" #include "header.h" -#include "stat.h" +#include "pmu.h" #include "session.h" +#include "stat.h" #include "target.h" -#include "evlist.h" -#include "evsel.h" #include "thread_map.h" -#include "util/hashmap.h" -#include =20 void update_stats(struct stats *stats, u64 val) { --=20 2.51.1.851.g4ebd6896fd-goog