aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-29 06:23:32 -0400
committerIngo Molnar <mingo@kernel.org>2013-10-29 06:23:32 -0400
commitaac898548d04c7bff179b79f805874b0d6f87571 (patch)
treee8de975fd5de6c95bf4329861a872dbcfe0c7ead /tools/perf/util/hist.h
parent2f5e98802350627ad6f2e3cee4d177059fc0c2f2 (diff)
parentcd65718712469ad844467250e8fad20a5838baae (diff)
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.h13
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 @@
5#include <pthread.h> 5#include <pthread.h>
6#include "callchain.h" 6#include "callchain.h"
7#include "header.h" 7#include "header.h"
8#include "color.h"
8#include "ui/progress.h" 9#include "ui/progress.h"
9 10
10extern struct callchain_param callchain_param; 11extern struct callchain_param callchain_param;
@@ -180,6 +181,18 @@ void perf_hpp__init(void);
180void perf_hpp__column_register(struct perf_hpp_fmt *format); 181void perf_hpp__column_register(struct perf_hpp_fmt *format);
181void perf_hpp__column_enable(unsigned col); 182void perf_hpp__column_enable(unsigned col);
182 183
184static inline size_t perf_hpp__use_color(void)
185{
186 return !symbol_conf.field_sep;
187}
188
189static inline size_t perf_hpp__color_overhead(void)
190{
191 return perf_hpp__use_color() ?
192 (COLOR_MAXLEN + sizeof(PERF_COLOR_RESET)) * PERF_HPP__MAX_INDEX
193 : 0;
194}
195
183struct perf_evlist; 196struct perf_evlist;
184 197
185struct hist_browser_timer { 198struct hist_browser_timer {