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.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index a48a2078d288..d4ec4822a103 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -52,6 +52,7 @@ enum hist_column {
52 HISTC_MEM_IADDR_SYMBOL, 52 HISTC_MEM_IADDR_SYMBOL,
53 HISTC_TRANSACTION, 53 HISTC_TRANSACTION,
54 HISTC_CYCLES, 54 HISTC_CYCLES,
55 HISTC_TRACE,
55 HISTC_NR_COLS, /* Last entry */ 56 HISTC_NR_COLS, /* Last entry */
56}; 57};
57 58
@@ -114,8 +115,8 @@ struct hist_entry *__hists__add_entry(struct hists *hists,
114 struct addr_location *al, 115 struct addr_location *al,
115 struct symbol *parent, 116 struct symbol *parent,
116 struct branch_info *bi, 117 struct branch_info *bi,
117 struct mem_info *mi, u64 period, 118 struct mem_info *mi,
118 u64 weight, u64 transaction, 119 struct perf_sample *sample,
119 bool sample_self); 120 bool sample_self);
120int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al, 121int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al,
121 int max_stack_depth, void *arg); 122 int max_stack_depth, void *arg);
@@ -184,6 +185,11 @@ static inline struct hists *evsel__hists(struct perf_evsel *evsel)
184} 185}
185 186
186int hists__init(void); 187int hists__init(void);
188int __hists__init(struct hists *hists);
189
190struct rb_root *hists__get_rotate_entries_in(struct hists *hists);
191bool hists__collapse_insert_entry(struct hists *hists __maybe_unused,
192 struct rb_root *root, struct hist_entry *he);
187 193
188struct perf_hpp { 194struct perf_hpp {
189 char *buf; 195 char *buf;
@@ -261,10 +267,20 @@ void perf_hpp__append_sort_keys(void);
261 267
262bool perf_hpp__is_sort_entry(struct perf_hpp_fmt *format); 268bool perf_hpp__is_sort_entry(struct perf_hpp_fmt *format);
263bool perf_hpp__same_sort_entry(struct perf_hpp_fmt *a, struct perf_hpp_fmt *b); 269bool perf_hpp__same_sort_entry(struct perf_hpp_fmt *a, struct perf_hpp_fmt *b);
270bool perf_hpp__is_dynamic_entry(struct perf_hpp_fmt *format);
271bool perf_hpp__defined_dynamic_entry(struct perf_hpp_fmt *fmt, struct hists *hists);
264 272
265static inline bool perf_hpp__should_skip(struct perf_hpp_fmt *format) 273static inline bool perf_hpp__should_skip(struct perf_hpp_fmt *format,
274 struct hists *hists)
266{ 275{
267 return format->elide; 276 if (format->elide)
277 return true;
278
279 if (perf_hpp__is_dynamic_entry(format) &&
280 !perf_hpp__defined_dynamic_entry(format, hists))
281 return true;
282
283 return false;
268} 284}
269 285
270void perf_hpp__reset_width(struct perf_hpp_fmt *fmt, struct hists *hists); 286void perf_hpp__reset_width(struct perf_hpp_fmt *fmt, struct hists *hists);