mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	 Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
	 Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	 James Clark <james.clark@linaro.org>,
	Tianyou Li <tianyou.li@intel.com>,
	 Jiebin Sun <jiebin.sun@intel.com>,
	Dapeng Mi <dapeng1.mi@linux.intel.com>,
	 Eric Biggers <ebiggers@kernel.org>,
	Thomas Richter <tmricht@linux.ibm.com>,
	 Stephen Brennan <stephen.s.brennan@oracle.com>,
	Swapnil Sapkal <swapnil.sapkal@amd.com>,
	 linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: [PATCH v3 6/6] perf hist: Remove keysym.h include from hist.h
Date: Wed,  2 Sep 2026 08:48:58 -0700	[thread overview]
Message-ID: <20260902154858.2078885-7-irogers@google.com> (raw)
In-Reply-To: <20260902154858.2078885-1-irogers@google.com>

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>
---
 tools/perf/builtin-annotate.c     | 8 ++++++++
 tools/perf/builtin-c2c.c          | 1 +
 tools/perf/builtin-kvm.c          | 1 +
 tools/perf/builtin-report.c       | 1 +
 tools/perf/builtin-top.c          | 1 +
 tools/perf/ui/browsers/annotate.c | 1 +
 tools/perf/ui/browsers/hists.c    | 1 +
 tools/perf/ui/browsers/scripts.c  | 1 +
 tools/perf/ui/libslang.h          | 2 ++
 tools/perf/util/hist.h            | 6 ------
 10 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index f208ff513238..a4c014a1d28f 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 60d1f166629e..6f4ad5fa536d 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 570410599f1b..44ba67e53cf1 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 e47a46775089..61ffdc52933d 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);
-- 
2.55.0.966.g6673acef38-goog


      parent reply	other threads:[~2026-09-02 15:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 15:48 [PATCH v3 0/6] perf tool: Build dependency tidy up Ian Rogers
2026-09-02 15:48 ` [PATCH v3 1/6] perf tool: Remove util/cache.h Ian Rogers
2026-09-02 15:48 ` [PATCH v3 2/6] perf tool: Tidy up util/cache.h header file users Ian Rogers
2026-09-02 15:48 ` [PATCH v3 3/6] perf tool: Remove unused includes in perf.c Ian Rogers
2026-09-02 15:48 ` [PATCH v3 4/6] perf tool: Move usage strings and functions to perf.c Ian Rogers
2026-09-02 15:48 ` [PATCH v3 5/6] perf tool: Add fallback stubs for missing dependencies Ian Rogers
2026-09-02 15:48 ` Ian Rogers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260902154858.2078885-7-irogers@google.com \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=ebiggers@kernel.org \
    --cc=james.clark@linaro.org \
    --cc=jiebin.sun@intel.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=stephen.s.brennan@oracle.com \
    --cc=swapnil.sapkal@amd.com \
    --cc=tianyou.li@intel.com \
    --cc=tmricht@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®