aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r--tools/perf/util/hist.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 8b091a51e4a2..a935a60d521c 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -126,13 +126,19 @@ struct perf_hpp {
126}; 126};
127 127
128struct perf_hpp_fmt { 128struct perf_hpp_fmt {
129 bool cond;
130 int (*header)(struct perf_hpp *hpp); 129 int (*header)(struct perf_hpp *hpp);
131 int (*width)(struct perf_hpp *hpp); 130 int (*width)(struct perf_hpp *hpp);
132 int (*color)(struct perf_hpp *hpp, struct hist_entry *he); 131 int (*color)(struct perf_hpp *hpp, struct hist_entry *he);
133 int (*entry)(struct perf_hpp *hpp, struct hist_entry *he); 132 int (*entry)(struct perf_hpp *hpp, struct hist_entry *he);
133
134 struct list_head list;
134}; 135};
135 136
137extern struct list_head perf_hpp__list;
138
139#define perf_hpp__for_each_format(format) \
140 list_for_each_entry(format, &perf_hpp__list, list)
141
136extern struct perf_hpp_fmt perf_hpp__format[]; 142extern struct perf_hpp_fmt perf_hpp__format[];
137 143
138enum { 144enum {
@@ -155,7 +161,8 @@ enum {
155}; 161};
156 162
157void perf_hpp__init(void); 163void perf_hpp__init(void);
158void perf_hpp__column_enable(unsigned col, bool enable); 164void perf_hpp__column_register(struct perf_hpp_fmt *format);
165void perf_hpp__column_enable(unsigned col);
159int hist_entry__period_snprintf(struct perf_hpp *hpp, struct hist_entry *he, 166int hist_entry__period_snprintf(struct perf_hpp *hpp, struct hist_entry *he,
160 bool color); 167 bool color);
161 168