From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f73.google.com (mail-dl1-f73.google.com [74.125.82.73]) (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 F1FF443D4E6 for ; Fri, 5 Jun 2026 07:40:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780645233; cv=none; b=p2wb//RfikK2IyV+ouVHKHhf4E0tft1gB2jSnEVDPLRElevEKfLMYBfq6WZujgaQnI1P1CxI+smDD5foCPUKoEvmMIcHPQmGiYx6xNxpDbituF0BlGApqR2AfeyHMpAYdbtq4499dgtcVm9zNuKSRMsktedVrwil8IL/MBojfcc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780645233; c=relaxed/simple; bh=RiYhss33D42QqLgZHZYYTehQt1u6H/vFc+MQ9nxfiLI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=u4olUxXeh/++FhmkZPk7dN0Km2Zwh8bG5YNmAf2YiZH0IA2n+f5fMeeARXJrMkonA4kKv0vD0+R8H5bgOH7xQ2asIes1f2CB4QHK/tqt2IAveUheaBBU3jDRnxUvuW6c41KxfjrvKpJZ1v9XN8xD/wfIkqavBgxIY+F9y9I7QhA= 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=kmcm3w7z; arc=none smtp.client-ip=74.125.82.73 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="kmcm3w7z" Received: by mail-dl1-f73.google.com with SMTP id a92af1059eb24-13709ab38a8so1928453c88.0 for ; Fri, 05 Jun 2026 00:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1780645231; x=1781250031; 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=uG+WKiPE75BjcS+qT2G4l2IRWyCoLrq3SXW8vmt3ReE=; b=kmcm3w7zz5rRpAAflOlR6Z9HPJOhytci38rIZGwPZh0sTlJo0DIsPit4FxVzu7KSNl zX9Ar+lVf+AZwNUFeV8BZ5dDKNPbUOROPtha+0LjsZv6qMwPwN3DzPPup/6sV6Y9cjc1 cQrYget8iD1h8evqr10stCBVtLh2oSw4EF+pZE8QbCyiGEmztrmp0/6EEo5DbTNGp7Mu Jk3mK0VkZOSdeivmF2IbvM9798tRUUi8g/C5syhKfLR61JCqRqLkbdOILfQpdpbmwDKQ 1CRjV5TfRzmhTi6a+uCbEk9TAFrVqiGWUgqoBpxgfOEG7yCHIrGOlur1/ubMaUG7KXb3 YPKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780645231; x=1781250031; 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=uG+WKiPE75BjcS+qT2G4l2IRWyCoLrq3SXW8vmt3ReE=; b=s4to/H9HhIojetGIxOJC90Jg518IQDNpNUNpuhq9EyDN9ftHyHUXclSkAlP1OfcMBu C0JESZr2VMU4oTYvyxi8kF77qclcW4fs2B3TjHbyauWktDeRk5THr/9kYJEimimdWaZy 7k9CzBUfXM8HjoYJ3/6DBXiMUPV8QJI2+cAaW8sn6bYmzhGq1/fQz2qoDCdHjonGH7Op 6hCKcbwPHyLMLY0r4ALfFnqxP64dOsB7tmhJMT6YHADH9Ubi3VtbdnhzWtdUR2LwPnrQ QerZZOuqt9rc0dHQBRabmvuF8NFMYJ1f084UPDiFDcQhInKz6EEhDWHOvYAf7ezjixpH Xc2w== X-Forwarded-Encrypted: i=1; AFNElJ/bEbJeIYHAJYFCj6Dy7mtH2I6mN9y01Gz0TdL9DRr5xQ05c/ymZ3roHTEzKgNX/JtjRPDORZdSkadBm5sNEcVC@vger.kernel.org X-Gm-Message-State: AOJu0YwAAYMUKtJLGJ7H0QIlX9+1ydXqFVefVbWgg1H0XP5tgMe3l5o1 qNp+9QPRngNj4gjjIDnWjqVIiQadW/h2HmmS4vvHEMTWpjGiSwtveMm90oFiYV3TncE+C4Fy0Fm P8zv/vrsXRA== X-Received: from dleb2-n2.prod.google.com ([2002:a05:701b:4242:20b0:138:637:8f17]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:301:b0:137:ff8:e41b with SMTP id a92af1059eb24-1380669c7b1mr925301c88.14.1780645230717; Fri, 05 Jun 2026 00:40:30 -0700 (PDT) Date: Fri, 5 Jun 2026 00:39:45 -0700 In-Reply-To: <20260605074003.1730715-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: <20260522220435.2378363-1-irogers@google.com> <20260605074003.1730715-1-irogers@google.com> X-Mailer: git-send-email 2.54.0.1032.g2f8565e1d1-goog Message-ID: <20260605074003.1730715-2-irogers@google.com> Subject: [PATCH v10 01/19] perf util: Sort includes and add missed explicit dependencies From: Ian Rogers To: irogers@google.com, 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-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, tmricht@linux.ibm.com 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. Acked-by: Namhyung Kim Signed-off-by: Ian Rogers --- tools/perf/util/bpf_off_cpu.c | 30 +++++----- tools/perf/util/bpf_trace_augment.c | 8 +-- tools/perf/util/evlist.c | 91 +++++++++++++++-------------- tools/perf/util/map.h | 9 ++- tools/perf/util/perf_api_probe.c | 18 +++--- tools/perf/util/s390-sample-raw.c | 19 +++--- tools/perf/util/stat-shadow.c | 20 ++++--- tools/perf/util/stat.c | 16 +++-- 8 files changed, 113 insertions(+), 98 deletions(-) diff --git a/tools/perf/util/bpf_off_cpu.c b/tools/perf/util/bpf_off_cpu.c index a3b699a5322f..48cb930cdd2e 100644 --- a/tools/perf/util/bpf_off_cpu.c +++ b/tools/perf/util/bpf_off_cpu.c @@ -1,23 +1,25 @@ // 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 -#include +#include "bpf_counter.h" #include "bpf_skel/off_cpu.skel.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" #define MAX_STACKS 32 #define MAX_PROC 4096 diff --git a/tools/perf/util/bpf_trace_augment.c b/tools/perf/util/bpf_trace_augment.c index 9e706f0fa53d..a9cf2a77ded1 100644 --- a/tools/perf/util/bpf_trace_augment.c +++ b/tools/perf/util/bpf_trace_augment.c @@ -1,11 +1,11 @@ #include #include -#include "util/debug.h" -#include "util/evlist.h" -#include "util/trace_augment.h" - #include "bpf_skel/augmented_raw_syscalls.skel.h" +#include "debug.h" +#include "evlist.h" +#include "parse-events.h" +#include "trace_augment.h" static struct augmented_raw_syscalls_bpf *skel; static struct evsel *bpf_output; diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 1a238b245b3a..ab6bf5e935f4 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -5,67 +5,68 @@ * Parts came from builtin-{top,stat,record}.c, see those files for further * copyright notes. */ -#include +#include "evlist.h" + #include #include -#include -#include "cpumap.h" -#include "util/mmap.h" -#include "thread_map.h" -#include "target.h" -#include "dwarf-regs.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 "parse-events.h" -#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 // page_size +#include +#include #include #include -#include #include +#include -#include +#include "../perf.h" +#include "affinity.h" +#include "asm/bug.h" +#include "bpf-event.h" +#include "bpf-filter.h" +#include "bpf_counter.h" +#include "cpumap.h" +#include "debug.h" +#include "dwarf-regs.h" +#include "env.h" +#include "event.h" +#include "evsel.h" +#include "evsel_fprintf.h" +#include "intel-tpebs.h" +#include "metricgroup.h" +#include "mmap.h" +#include "parse-events.h" +#include "perf_api_probe.h" +#include "pmu.h" +#include "pmus.h" +#include "record.h" +#include "sample.h" +#include "stat.h" +#include "strbuf.h" +#include "string2.h" +#include "target.h" +#include "thread_map.h" +#include "units.h" +#include "util.h" #ifdef LACKS_SIGQUEUE_PROTOTYPE int sigqueue(pid_t pid, int sig, const union sigval value); diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h index 979b3e11b9bc..fb0279810ae9 100644 --- a/tools/perf/util/map.h +++ b/tools/perf/util/map.h @@ -2,14 +2,13 @@ #ifndef __PERF_MAP_H #define __PERF_MAP_H -#include -#include -#include -#include +#include #include #include -#include + +#include #include + #include struct dso; diff --git a/tools/perf/util/perf_api_probe.c b/tools/perf/util/perf_api_probe.c index 6ecf38314f01..e1904a330b28 100644 --- a/tools/perf/util/perf_api_probe.c +++ b/tools/perf/util/perf_api_probe.c @@ -1,14 +1,18 @@ /* SPDX-License-Identifier: GPL-2.0 */ +#include "perf_api_probe.h" -#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 + +#include "cloexec.h" +#include "evlist.h" +#include "evsel.h" +#include "parse-events.h" +#include "perf-sys.h" +#include "pmu.h" +#include "pmus.h" + typedef void (*setup_probe_fn_t)(struct evsel *evsel); static int perf_do_probe_api(setup_probe_fn_t fn, struct perf_cpu cpu, const char *str) diff --git a/tools/perf/util/s390-sample-raw.c b/tools/perf/util/s390-sample-raw.c index 52bbca5c56c8..01111c4e3488 100644 --- a/tools/perf/util/s390-sample-raw.c +++ b/tools/perf/util/s390-sample-raw.c @@ -12,25 +12,26 @@ * sample was taken from. */ -#include +#include #include #include -#include -#include +#include #include #include -#include +#include +#include +#include "color.h" #include "debug.h" -#include "session.h" #include "evlist.h" -#include "color.h" #include "hashmap.h" -#include "sample-raw.h" +#include "pmu.h" +#include "pmus.h" #include "s390-cpumcf-kernel.h" -#include "util/pmu.h" -#include "util/sample.h" +#include "sample-raw.h" +#include "sample.h" +#include "session.h" static size_t ctrset_size(struct cf_ctrset_entry *set) { diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index c17373bb0e1e..35062f964618 100644 --- a/tools/perf/util/stat-shadow.c +++ b/tools/perf/util/stat-shadow.c @@ -2,20 +2,24 @@ #include #include #include -#include "evsel.h" -#include "stat.h" + +#include + +#include "cgroup.h" #include "color.h" #include "debug.h" -#include "pmu.h" -#include "rblist.h" #include "evlist.h" +#include "evsel.h" #include "expr.h" -#include "metricgroup.h" -#include "cgroup.h" -#include "units.h" +#include "hashmap.h" #include "iostat.h" -#include "util/hashmap.h" +#include "metricgroup.h" +#include "pmu.h" +#include "pmus.h" +#include "rblist.h" +#include "stat.h" #include "tool_pmu.h" +#include "units.h" static bool tool_pmu__is_time_event(const struct perf_stat_config *config, const struct evsel *evsel, int *tool_aggr_idx) diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index 14d169e22e8f..66eb9a66a4f7 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c @@ -1,21 +1,25 @@ // SPDX-License-Identifier: GPL-2.0 +#include "stat.h" + #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 "target.h" -#include "evlist.h" -#include "evsel.h" #include "thread_map.h" -#include "util/hashmap.h" -#include void update_stats(struct stats *stats, u64 val) { -- 2.54.0.1032.g2f8565e1d1-goog