summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/arch/common.c1
-rw-r--r--tools/perf/tests/llvm.c1
-rw-r--r--tools/perf/ui/gtk/util.c1
-rw-r--r--tools/perf/ui/helpline.c1
-rw-r--r--tools/perf/ui/tui/setup.c2
-rw-r--r--tools/perf/util/alias.c1
-rw-r--r--tools/perf/util/cache.h3
-rw-r--r--tools/perf/util/levenshtein.c4
-rw-r--r--tools/perf/util/llvm-utils.c2
-rw-r--r--tools/perf/util/path.c2
-rw-r--r--tools/perf/util/target.c1
11 files changed, 15 insertions, 4 deletions
diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
index ee6966812a5a..886dd2aaff0d 100644
--- a/tools/perf/arch/common.c
+++ b/tools/perf/arch/common.c
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <sys/utsname.h>
#include "common.h"
+#include "../util/util.h"
#include "../util/debug.h"
const char *const arm_triplets[] = {
diff --git a/tools/perf/tests/llvm.c b/tools/perf/tests/llvm.c
index cff564fb4b66..b798a4bfd238 100644
--- a/tools/perf/tests/llvm.c
+++ b/tools/perf/tests/llvm.c
@@ -5,6 +5,7 @@
#include "llvm.h"
#include "tests.h"
#include "debug.h"
+#include "util.h"
#ifdef HAVE_LIBBPF_SUPPORT
static int test__bpf_parsing(void *obj_buf, size_t obj_buf_sz)
diff --git a/tools/perf/ui/gtk/util.c b/tools/perf/ui/gtk/util.c
index 52e7fc48af9f..00b91921edb1 100644
--- a/tools/perf/ui/gtk/util.c
+++ b/tools/perf/ui/gtk/util.c
@@ -1,4 +1,5 @@
#include "../util.h"
+#include "../../util/util.h"
#include "../../util/debug.h"
#include "gtk.h"
diff --git a/tools/perf/ui/helpline.c b/tools/perf/ui/helpline.c
index 700fb3cfa1c7..5b74a7eba210 100644
--- a/tools/perf/ui/helpline.c
+++ b/tools/perf/ui/helpline.c
@@ -5,6 +5,7 @@
#include "../debug.h"
#include "helpline.h"
#include "ui.h"
+#include "../util.h"
char ui_helpline__current[512];
diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c
index 7dfeba0a91f3..4ea2ba861fc2 100644
--- a/tools/perf/ui/tui/setup.c
+++ b/tools/perf/ui/tui/setup.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <signal.h>
#include <stdbool.h>
#ifdef HAVE_BACKTRACE_SUPPORT
@@ -6,6 +7,7 @@
#include "../../util/cache.h"
#include "../../util/debug.h"
+#include "../../util/util.h"
#include "../browser.h"
#include "../helpline.h"
#include "../ui.h"
diff --git a/tools/perf/util/alias.c b/tools/perf/util/alias.c
index 6c80f830358b..6455471d9cd1 100644
--- a/tools/perf/util/alias.c
+++ b/tools/perf/util/alias.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "util.h"
#include "config.h"
static const char *alias_key;
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h
index 9f90e36b56fb..512c0c83fbc6 100644
--- a/tools/perf/util/cache.h
+++ b/tools/perf/util/cache.h
@@ -1,11 +1,8 @@
#ifndef __PERF_CACHE_H
#define __PERF_CACHE_H
-#include <stdbool.h>
-#include "util.h"
#include "strbuf.h"
#include <subcmd/pager.h>
-#include "../perf.h"
#include "../ui/ui.h"
#include <linux/string.h>
diff --git a/tools/perf/util/levenshtein.c b/tools/perf/util/levenshtein.c
index e521d1516df6..f616e4f65b67 100644
--- a/tools/perf/util/levenshtein.c
+++ b/tools/perf/util/levenshtein.c
@@ -1,5 +1,7 @@
-#include "cache.h"
#include "levenshtein.h"
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
/*
* This function implements the Damerau-Levenshtein algorithm to
diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c
index 282c30f6a51d..bf7216b8731d 100644
--- a/tools/perf/util/llvm-utils.c
+++ b/tools/perf/util/llvm-utils.c
@@ -3,12 +3,14 @@
* Copyright (C) 2015, Huawei Inc.
*/
+#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include "debug.h"
#include "llvm-utils.h"
#include "config.h"
+#include "util.h"
#define CLANG_BPF_CMD_DEFAULT_TEMPLATE \
"$CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS "\
diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c
index cff8bf0f87e8..7c7630be5a89 100644
--- a/tools/perf/util/path.c
+++ b/tools/perf/util/path.c
@@ -11,6 +11,8 @@
* which is what it's designed for.
*/
#include "cache.h"
+#include "util.h"
+#include <limits.h>
static char bad_path[] = "/bad-path/";
/*
diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
index 5898af4510cc..8cdcf4641c51 100644
--- a/tools/perf/util/target.c
+++ b/tools/perf/util/target.c
@@ -7,6 +7,7 @@
*/
#include "target.h"
+#include "util.h"
#include "debug.h"
#include <pwd.h>