summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-09-02 08:48:58 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-09-08 17:50:37 -0300
commit537ff9c4271d0903f3652886aa29371a104ea649 (patch)
tree059dc720650020556f18a8a48b709b2edd7ad3c5
parentd845187d47e84111882121d96d3969d40913d5e0 (diff)
downloadlinux-next-537ff9c4271d0903f3652886aa29371a104ea649.tar.gz
linux-next-537ff9c4271d0903f3652886aa29371a104ea649.zip
perf hist: Remove keysym.h include from hist.h
hist.h isn't related to UI and so remove the UI inclusion. Fix the transitive dependency issues this exposes. Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/builtin-annotate.c8
-rw-r--r--tools/perf/builtin-c2c.c1
-rw-r--r--tools/perf/builtin-kvm.c1
-rw-r--r--tools/perf/builtin-report.c1
-rw-r--r--tools/perf/builtin-top.c1
-rw-r--r--tools/perf/ui/browsers/annotate.c1
-rw-r--r--tools/perf/ui/browsers/hists.c1
-rw-r--r--tools/perf/ui/browsers/scripts.c1
-rw-r--r--tools/perf/ui/libslang.h2
-rw-r--r--tools/perf/util/hist.h6
10 files changed, 17 insertions, 6 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 1466b5dca5f2..4638e6fdc39b 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -24,6 +24,7 @@
#include "arch/common.h"
#include "builtin.h"
#include "perf.h"
+#include "ui/keysyms.h"
#include "ui/progress.h"
#include "ui/ui.h"
#include "util/annotate-data.h"
@@ -46,6 +47,13 @@
#include "util/tool.h"
#include "util/util.h"
+#ifndef HAVE_SLANG_SUPPORT
+#undef K_LEFT
+#define K_LEFT -1000
+#undef K_RIGHT
+#define K_RIGHT -2000
+#endif
+
struct perf_annotate {
struct perf_tool tool;
struct perf_session *session;
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 715b75d42f2a..6b64c0d6b24f 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -49,6 +49,7 @@
#include "thread.h"
#include "tool.h"
#include "ui/browsers/hists.h"
+#include "ui/keysyms.h"
#include "ui/progress.h"
#include "ui/ui.h"
#include "util/annotate.h"
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index b9f6cb71c0a0..c5e82c078848 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -27,6 +27,7 @@
#include "util/kvm-stat.h"
#include "util/util.h"
#include "ui/browsers/hists.h"
+#include "ui/keysyms.h"
#include "ui/progress.h"
#include "ui/ui.h"
#include "util/string2.h"
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index b55c01bb45b4..b280ff9ff45e 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -51,6 +51,7 @@
#include "util/units.h"
#include "util/unwind.h"
#include "util/util.h" // perf_tip()
+#include "ui/keysyms.h"
#include "ui/ui.h"
#include "ui/progress.h"
#include "util/block-info.h"
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 2888ac3b7b92..c2562d49be46 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -51,6 +51,7 @@
#include "util/intlist.h"
#include "util/parse-branch-options.h"
#include "arch/common.h"
+#include "ui/keysyms.h"
#include "ui/ui.h"
#include "util/debug.h"
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index e8de644c0e9d..cf36b5347f72 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "../browser.h"
#include "../helpline.h"
+#include "../keysyms.h"
#include "../ui.h"
#include "../../util/annotate.h"
#include "../../util/debug.h"
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index c15874a491b4..f62cb2d534ed 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -35,6 +35,7 @@
#include "../browsers/hists.h"
#include "../helpline.h"
+#include "../keysyms.h"
#include "../util.h"
#include "../ui.h"
#include "map.h"
diff --git a/tools/perf/ui/browsers/scripts.c b/tools/perf/ui/browsers/scripts.c
index 1e8c2c2f952d..94cc1f427c96 100644
--- a/tools/perf/ui/browsers/scripts.c
+++ b/tools/perf/ui/browsers/scripts.c
@@ -7,6 +7,7 @@
#include "../../util/session.h"
#include "../../util/symbol.h"
#include "../browser.h"
+#include "../keysyms.h"
#include "../libslang.h"
#include "config.h"
#include <linux/err.h>
diff --git a/tools/perf/ui/libslang.h b/tools/perf/ui/libslang.h
index 6722561e0458..dd6b9f192155 100644
--- a/tools/perf/ui/libslang.h
+++ b/tools/perf/ui/libslang.h
@@ -15,7 +15,9 @@
#define ENABLE_SLFUTURE_CONST 1
#define ENABLE_SLFUTURE_VOID 1
+#ifdef HAVE_SLANG_SUPPORT
#include <slang.h>
+#endif
#define SL_KEY_UNTAB 0x1000
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index b830cbe7f95b..b30375a203e7 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -714,7 +714,6 @@ struct block_hist {
#define NO_ADDR 0
#ifdef HAVE_SLANG_SUPPORT
-#include "../ui/keysyms.h"
void attr_to_script(char *buf, struct perf_event_attr *attr);
int __hist_entry__tui_annotate(struct hist_entry *he, struct map_symbol *ms,
@@ -787,11 +786,6 @@ static inline int block_hists_tui_browse(struct block_hist *bh __maybe_unused,
{
return 0;
}
-
-#define K_LEFT -1000
-#define K_RIGHT -2000
-#define K_SWITCH_INPUT_DATA -3000
-#define K_RELOAD -4000
#endif
unsigned int hists__sort_list_width(struct hists *hists);