summaryrefslogtreecommitdiff
path: root/tools/perf/util
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2025-11-09 17:31:52 -0800
committerNamhyung Kim <namhyung@kernel.org>2025-11-13 23:03:11 -0800
commitca016b6527e154013693722a2cdbec7c05fb6df7 (patch)
tree82a9908c6d52dac7d256ec93e47a41e0606eed1d /tools/perf/util
parent754187ad73b73bcb44f106a8e5fc88789beff1bd (diff)
perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies
errno.h isn't used in auxtrace.h so remove it and fix build failures caused by transitive dependencies through auxtrace.h on errno.h. Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/annotate-data.c2
-rw-r--r--tools/perf/util/auxtrace.h1
-rw-r--r--tools/perf/util/bpf-filter.h2
-rw-r--r--tools/perf/util/bpf-trace-summary.c1
-rw-r--r--tools/perf/util/bpf_counter_cgroup.c1
-rw-r--r--tools/perf/util/bpf_ftrace.c3
-rw-r--r--tools/perf/util/bpf_map.c1
-rw-r--r--tools/perf/util/cgroup.c1
-rw-r--r--tools/perf/util/drm_pmu.c1
-rw-r--r--tools/perf/util/evswitch.c1
-rw-r--r--tools/perf/util/intel-tpebs.c1
-rw-r--r--tools/perf/util/kvm-stat.h1
-rw-r--r--tools/perf/util/mmap.c1
-rw-r--r--tools/perf/util/pfm.c1
-rw-r--r--tools/perf/util/powerpc-vpadtl.c1
-rw-r--r--tools/perf/util/stat-shadow.c1
16 files changed, 17 insertions, 3 deletions
diff --git a/tools/perf/util/annotate-data.c b/tools/perf/util/annotate-data.c
index e183c6104d59..07cf9c334be0 100644
--- a/tools/perf/util/annotate-data.c
+++ b/tools/perf/util/annotate-data.c
@@ -4,7 +4,7 @@
*
* Written by Namhyung Kim <namhyung@kernel.org>
*/
-
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
index 59cf72b935ff..eee2c11f7666 100644
--- a/tools/perf/util/auxtrace.h
+++ b/tools/perf/util/auxtrace.h
@@ -7,7 +7,6 @@
#ifndef __PERF_AUXTRACE_H
#define __PERF_AUXTRACE_H
-#include <errno.h>
#include <stdio.h> // FILE
#include <linux/perf_event.h>
#include <linux/types.h>
diff --git a/tools/perf/util/bpf-filter.h b/tools/perf/util/bpf-filter.h
index 122477f2de44..818c554b91b2 100644
--- a/tools/perf/util/bpf-filter.h
+++ b/tools/perf/util/bpf-filter.h
@@ -36,6 +36,8 @@ int perf_bpf_filter__unpin(void);
#else /* !HAVE_BPF_SKEL */
+#include <errno.h>
+
static inline int perf_bpf_filter__parse(struct list_head *expr_head __maybe_unused,
const char *str __maybe_unused)
{
diff --git a/tools/perf/util/bpf-trace-summary.c b/tools/perf/util/bpf-trace-summary.c
index 8dfe7e678941..cf6e1e4402d5 100644
--- a/tools/perf/util/bpf-trace-summary.c
+++ b/tools/perf/util/bpf-trace-summary.c
@@ -1,4 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
+#include <errno.h>
#include <inttypes.h>
#include <math.h>
#include <stdio.h>
diff --git a/tools/perf/util/bpf_counter_cgroup.c b/tools/perf/util/bpf_counter_cgroup.c
index 68bd994c8880..17d7196c6589 100644
--- a/tools/perf/util/bpf_counter_cgroup.c
+++ b/tools/perf/util/bpf_counter_cgroup.c
@@ -4,6 +4,7 @@
/* Copyright (c) 2021 Google */
#include <assert.h>
+#include <errno.h>
#include <limits.h>
#include <unistd.h>
#include <sys/file.h>
diff --git a/tools/perf/util/bpf_ftrace.c b/tools/perf/util/bpf_ftrace.c
index e61a3b20be0a..c456d24efa30 100644
--- a/tools/perf/util/bpf_ftrace.c
+++ b/tools/perf/util/bpf_ftrace.c
@@ -1,6 +1,7 @@
-#include <stdio.h>
+#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
#include <bpf/bpf.h>
diff --git a/tools/perf/util/bpf_map.c b/tools/perf/util/bpf_map.c
index 578f27d2d6b4..442f91b4e8e1 100644
--- a/tools/perf/util/bpf_map.c
+++ b/tools/perf/util/bpf_map.c
@@ -5,6 +5,7 @@
#include <bpf/libbpf.h>
#include <linux/err.h>
#include <linux/kernel.h>
+#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/tools/perf/util/cgroup.c b/tools/perf/util/cgroup.c
index 25e2769b5e74..040eb75f0804 100644
--- a/tools/perf/util/cgroup.c
+++ b/tools/perf/util/cgroup.c
@@ -10,6 +10,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/statfs.h>
+#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
diff --git a/tools/perf/util/drm_pmu.c b/tools/perf/util/drm_pmu.c
index 98d4d2b556d4..b3052266d599 100644
--- a/tools/perf/util/drm_pmu.c
+++ b/tools/perf/util/drm_pmu.c
@@ -10,6 +10,7 @@
#include <api/io.h>
#include <ctype.h>
#include <dirent.h>
+#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/unistd.h>
diff --git a/tools/perf/util/evswitch.c b/tools/perf/util/evswitch.c
index 40cb56a9347d..d4c06a3f825a 100644
--- a/tools/perf/util/evswitch.c
+++ b/tools/perf/util/evswitch.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (C) 2019, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
+#include <errno.h>
#include "evswitch.h"
#include "evlist.h"
diff --git a/tools/perf/util/intel-tpebs.c b/tools/perf/util/intel-tpebs.c
index 21359155f2a0..3c958d738ca6 100644
--- a/tools/perf/util/intel-tpebs.c
+++ b/tools/perf/util/intel-tpebs.c
@@ -25,6 +25,7 @@
#include "stat.h"
#include <sys/stat.h>
#include <sys/file.h>
+#include <errno.h>
#include <poll.h>
#include <math.h>
diff --git a/tools/perf/util/kvm-stat.h b/tools/perf/util/kvm-stat.h
index 53db3d56108b..a356b839c2ee 100644
--- a/tools/perf/util/kvm-stat.h
+++ b/tools/perf/util/kvm-stat.h
@@ -10,6 +10,7 @@
#include "symbol.h"
#include "record.h"
+#include <errno.h>
#include <stdlib.h>
#include <linux/zalloc.h>
diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c
index a34726219af3..b69f926d314b 100644
--- a/tools/perf/util/mmap.c
+++ b/tools/perf/util/mmap.c
@@ -7,6 +7,7 @@
*/
#include <sys/mman.h>
+#include <errno.h>
#include <inttypes.h>
#include <asm/bug.h>
#include <linux/zalloc.h>
diff --git a/tools/perf/util/pfm.c b/tools/perf/util/pfm.c
index e5b3a2a5ddef..d9043f4afbe7 100644
--- a/tools/perf/util/pfm.c
+++ b/tools/perf/util/pfm.c
@@ -15,6 +15,7 @@
#include "util/strbuf.h"
#include "util/thread_map.h"
+#include <errno.h>
#include <string.h>
#include <linux/kernel.h>
#include <perfmon/pfmlib_perf_event.h>
diff --git a/tools/perf/util/powerpc-vpadtl.c b/tools/perf/util/powerpc-vpadtl.c
index bfa4156d7a97..d1c3396f182f 100644
--- a/tools/perf/util/powerpc-vpadtl.c
+++ b/tools/perf/util/powerpc-vpadtl.c
@@ -4,6 +4,7 @@
*/
#include <linux/string.h>
+#include <errno.h>
#include <inttypes.h>
#include "color.h"
#include "evlist.h"
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
index b3b482e1808f..15e83d74eb0e 100644
--- a/tools/perf/util/stat-shadow.c
+++ b/tools/perf/util/stat-shadow.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#include <errno.h>
#include <math.h>
#include <stdio.h>
#include "evsel.h"