diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-10-29 14:23:32 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-29 14:23:32 +0400 |
commit | aac898548d04c7bff179b79f805874b0d6f87571 (patch) | |
tree | e8de975fd5de6c95bf4329861a872dbcfe0c7ead /tools/perf/util/hist.h | |
parent | 2f5e98802350627ad6f2e3cee4d177059fc0c2f2 (diff) | |
parent | cd65718712469ad844467250e8fad20a5838baae (diff) | |
download | linux-aac898548d04c7bff179b79f805874b0d6f87571.tar.xz |
Merge branch 'perf/urgent' into perf/core
Conflicts:
tools/perf/builtin-record.c
tools/perf/builtin-top.c
tools/perf/util/hist.h
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r-- | tools/perf/util/hist.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 0c7ce8bb8eba..9d2d022cdb79 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -5,6 +5,7 @@ #include <pthread.h> #include "callchain.h" #include "header.h" +#include "color.h" #include "ui/progress.h" extern struct callchain_param callchain_param; @@ -180,6 +181,18 @@ void perf_hpp__init(void); void perf_hpp__column_register(struct perf_hpp_fmt *format); void perf_hpp__column_enable(unsigned col); +static inline size_t perf_hpp__use_color(void) +{ + return !symbol_conf.field_sep; +} + +static inline size_t perf_hpp__color_overhead(void) +{ + return perf_hpp__use_color() ? + (COLOR_MAXLEN + sizeof(PERF_COLOR_RESET)) * PERF_HPP__MAX_INDEX + : 0; +} + struct perf_evlist; struct hist_browser_timer { |