[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170419161723.21011-22-acme@kernel.org>
Date: Wed, 19 Apr 2017 13:17:16 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Adrian Hunter <adrian.hunter@...el.com>,
David Ahern <dsahern@...il.com>, Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Wang Nan <wangnan0@...wei.com>
Subject: [PATCH 21/28] perf tools: Don't include terminal handling headers in util.h
From: Arnaldo Carvalho de Melo <acme@...hat.com>
Continuing the disentanglement, mostly the TUI needs CTRL(c), that is
in sys/ttydefaults.h and term.c needs the termios headers.
And term.h needs to be added to a few places too.
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-il19zna7qj9ytavdbwlipc7t@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-kvm.c | 1 +
tools/perf/builtin-top.c | 1 +
tools/perf/ui/browsers/annotate.c | 1 +
tools/perf/ui/browsers/header.c | 2 ++
tools/perf/ui/browsers/hists.c | 1 +
tools/perf/util/parse-events.c | 2 +-
tools/perf/util/term.c | 6 +++++-
tools/perf/util/util.h | 4 ----
8 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 40660428fa72..4002277475cf 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -3,6 +3,7 @@
#include "util/evsel.h"
#include "util/evlist.h"
+#include "util/term.h"
#include "util/util.h"
#include "util/cache.h"
#include "util/symbol.h"
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index ec3247db4826..47984a838b73 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -40,6 +40,7 @@
#include "util/cpumap.h"
#include "util/xyarray.h"
#include "util/sort.h"
+#include "util/term.h"
#include "util/intlist.h"
#include "util/parse-branch-options.h"
#include "arch/common.h"
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 2ed64124276f..d990ad08a3c6 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -12,6 +12,7 @@
#include <inttypes.h>
#include <pthread.h>
#include <linux/kernel.h>
+#include <sys/ttydefaults.h>
struct disasm_line_samples {
double percent;
diff --git a/tools/perf/ui/browsers/header.c b/tools/perf/ui/browsers/header.c
index edbeaaf31ace..e2c9390ff4c5 100644
--- a/tools/perf/ui/browsers/header.c
+++ b/tools/perf/ui/browsers/header.c
@@ -8,6 +8,8 @@
#include "util/header.h"
#include "util/session.h"
+#include <sys/ttydefaults.h>
+
static void ui_browser__argv_write(struct ui_browser *browser,
void *entry, int row)
{
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 0916575c6694..a271b48ad0d3 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <linux/rbtree.h>
+#include <sys/ttydefaults.h>
#include "../../util/evsel.h"
#include "../../util/evlist.h"
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 580f0e17ad38..f3dd1aa59a25 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1,7 +1,7 @@
#include <linux/hw_breakpoint.h>
#include <linux/err.h>
#include <errno.h>
-#include "util.h"
+#include "term.h"
#include "../perf.h"
#include "evlist.h"
#include "evsel.h"
diff --git a/tools/perf/util/term.c b/tools/perf/util/term.c
index 90b47d8aa19c..8f254a74d97d 100644
--- a/tools/perf/util/term.c
+++ b/tools/perf/util/term.c
@@ -1,4 +1,8 @@
-#include "util.h"
+#include "term.h"
+#include <stdlib.h>
+#include <termios.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
void get_term_dimensions(struct winsize *ws)
{
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 397676c25232..fa8c2e59a0bc 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -17,7 +17,6 @@
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
-#include <term.h>
#include <limits.h>
#include <sys/param.h>
#include <sys/types.h>
@@ -35,11 +34,8 @@
#include <sys/ioctl.h>
#include <linux/kernel.h>
#include <linux/types.h>
-#include <sys/ttydefaults.h>
#include <api/fs/tracing_path.h>
-#include <termios.h>
#include <linux/bitops.h>
-#include <termios.h>
extern char buildid_dir[];
--
2.9.3
Powered by blists - more mailing lists