]> git.baikalelectronics.ru Git - kernel.git/commit
perf ui stdio: Add way to setup the color output mode selection
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 5 Jul 2016 14:05:24 +0000 (11:05 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 12 Jul 2016 03:00:39 +0000 (00:00 -0300)
commitb503032fdf4fa8e68fbe48c7a79500ff4758766a
treeff31479eaec303414f454c81a24c14b125d24708
parentbb2ab44fbe146dcc25c66d9dfe09323b54c8fc39
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>
tools/perf/ui/setup.c
tools/perf/ui/ui.h