diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-18 10:08:10 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-19 12:01:53 -0400 |
commit | b0742e90f5ab904aa835350c28bcec48e9109379 (patch) | |
tree | 32aac13c7004239579aea973b88d98a3e7e95cae /tools/perf | |
parent | 8ec20b176c4be72d067fa18e33a4f156d1da9bc8 (diff) |
perf tools: Don't include terminal handling headers in util.h
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@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-il19zna7qj9ytavdbwlipc7t@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-kvm.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-top.c | 1 | ||||
-rw-r--r-- | tools/perf/ui/browsers/annotate.c | 1 | ||||
-rw-r--r-- | tools/perf/ui/browsers/header.c | 2 | ||||
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 1 | ||||
-rw-r--r-- | tools/perf/util/parse-events.c | 2 | ||||
-rw-r--r-- | tools/perf/util/term.c | 6 | ||||
-rw-r--r-- | 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 @@ | |||
3 | 3 | ||
4 | #include "util/evsel.h" | 4 | #include "util/evsel.h" |
5 | #include "util/evlist.h" | 5 | #include "util/evlist.h" |
6 | #include "util/term.h" | ||
6 | #include "util/util.h" | 7 | #include "util/util.h" |
7 | #include "util/cache.h" | 8 | #include "util/cache.h" |
8 | #include "util/symbol.h" | 9 | #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 @@ | |||
40 | #include "util/cpumap.h" | 40 | #include "util/cpumap.h" |
41 | #include "util/xyarray.h" | 41 | #include "util/xyarray.h" |
42 | #include "util/sort.h" | 42 | #include "util/sort.h" |
43 | #include "util/term.h" | ||
43 | #include "util/intlist.h" | 44 | #include "util/intlist.h" |
44 | #include "util/parse-branch-options.h" | 45 | #include "util/parse-branch-options.h" |
45 | #include "arch/common.h" | 46 | #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 @@ | |||
12 | #include <inttypes.h> | 12 | #include <inttypes.h> |
13 | #include <pthread.h> | 13 | #include <pthread.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <sys/ttydefaults.h> | ||
15 | 16 | ||
16 | struct disasm_line_samples { | 17 | struct disasm_line_samples { |
17 | double percent; | 18 | 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 @@ | |||
8 | #include "util/header.h" | 8 | #include "util/header.h" |
9 | #include "util/session.h" | 9 | #include "util/session.h" |
10 | 10 | ||
11 | #include <sys/ttydefaults.h> | ||
12 | |||
11 | static void ui_browser__argv_write(struct ui_browser *browser, | 13 | static void ui_browser__argv_write(struct ui_browser *browser, |
12 | void *entry, int row) | 14 | void *entry, int row) |
13 | { | 15 | { |
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 @@ | |||
4 | #include <stdlib.h> | 4 | #include <stdlib.h> |
5 | #include <string.h> | 5 | #include <string.h> |
6 | #include <linux/rbtree.h> | 6 | #include <linux/rbtree.h> |
7 | #include <sys/ttydefaults.h> | ||
7 | 8 | ||
8 | #include "../../util/evsel.h" | 9 | #include "../../util/evsel.h" |
9 | #include "../../util/evlist.h" | 10 | #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 @@ | |||
1 | #include <linux/hw_breakpoint.h> | 1 | #include <linux/hw_breakpoint.h> |
2 | #include <linux/err.h> | 2 | #include <linux/err.h> |
3 | #include <errno.h> | 3 | #include <errno.h> |
4 | #include "util.h" | 4 | #include "term.h" |
5 | #include "../perf.h" | 5 | #include "../perf.h" |
6 | #include "evlist.h" | 6 | #include "evlist.h" |
7 | #include "evsel.h" | 7 | #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 @@ | |||
1 | #include "util.h" | 1 | #include "term.h" |
2 | #include <stdlib.h> | ||
3 | #include <termios.h> | ||
4 | #include <unistd.h> | ||
5 | #include <sys/ioctl.h> | ||
2 | 6 | ||
3 | void get_term_dimensions(struct winsize *ws) | 7 | void get_term_dimensions(struct winsize *ws) |
4 | { | 8 | { |
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 @@ | |||
17 | #include <stdlib.h> | 17 | #include <stdlib.h> |
18 | #include <stdarg.h> | 18 | #include <stdarg.h> |
19 | #include <string.h> | 19 | #include <string.h> |
20 | #include <term.h> | ||
21 | #include <limits.h> | 20 | #include <limits.h> |
22 | #include <sys/param.h> | 21 | #include <sys/param.h> |
23 | #include <sys/types.h> | 22 | #include <sys/types.h> |
@@ -35,11 +34,8 @@ | |||
35 | #include <sys/ioctl.h> | 34 | #include <sys/ioctl.h> |
36 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
37 | #include <linux/types.h> | 36 | #include <linux/types.h> |
38 | #include <sys/ttydefaults.h> | ||
39 | #include <api/fs/tracing_path.h> | 37 | #include <api/fs/tracing_path.h> |
40 | #include <termios.h> | ||
41 | #include <linux/bitops.h> | 38 | #include <linux/bitops.h> |
42 | #include <termios.h> | ||
43 | 39 | ||
44 | extern char buildid_dir[]; | 40 | extern char buildid_dir[]; |
45 | 41 | ||