aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/ui.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-07-05 11:05:24 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-07-12 00:00:39 -0300
commitc09615f29c70d4155986f55097a99ad8f2036ca1 (patch)
treeff31479eaec303414f454c81a24c14b125d24708 /tools/perf/ui/ui.h
parentperf hists: Introduce hists__add_entry_ops function (diff)
downloadlinux-dev-c09615f29c70d4155986f55097a99ad8f2036ca1.tar.xz
linux-dev-c09615f29c70d4155986f55097a99ad8f2036ca1.zip
perf ui stdio: Add way to setup the color output mode selection
In --stdio we turn off color output when the output is not a tty, which is not always desirable, for instance, in: perf annotate | more the 'more' tool is perfectly capable of processing the escape sequences for colored output. Allow using the existing logic for .perfconfig's "color.ui" to be used from the command line by providing a stdio__config_color() helper, that will be used by annotate and report in follow up patches. 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: Peter Zijlstra <peterz@infradead.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-1u4wjdbcc41dxndsb4klpa9y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/ui.h')
-rw-r--r--tools/perf/ui/ui.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/ui/ui.h b/tools/perf/ui/ui.h
index ab88383f8be8..4b6fb6c7a542 100644
--- a/tools/perf/ui/ui.h
+++ b/tools/perf/ui/ui.h
@@ -26,4 +26,8 @@ static inline void ui__exit(bool wait_for_ok __maybe_unused) {}
void ui__refresh_dimensions(bool force);
+struct option;
+
+int stdio__config_color(const struct option *opt, const char *mode, int unset);
+
#endif /* _PERF_UI_H_ */