diff options
Diffstat (limited to 'tools/perf/ui/hist.c')
-rw-r--r-- | tools/perf/ui/hist.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index dc900d7a190e..0a193281eba8 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c | |||
@@ -236,46 +236,6 @@ void perf_hpp__column_enable(unsigned col) | |||
236 | perf_hpp__column_register(&perf_hpp__format[col]); | 236 | perf_hpp__column_register(&perf_hpp__format[col]); |
237 | } | 237 | } |
238 | 238 | ||
239 | static inline void advance_hpp(struct perf_hpp *hpp, int inc) | ||
240 | { | ||
241 | hpp->buf += inc; | ||
242 | hpp->size -= inc; | ||
243 | } | ||
244 | |||
245 | int hist_entry__period_snprintf(struct perf_hpp *hpp, struct hist_entry *he, | ||
246 | bool color) | ||
247 | { | ||
248 | const char *sep = symbol_conf.field_sep; | ||
249 | struct perf_hpp_fmt *fmt; | ||
250 | char *start = hpp->buf; | ||
251 | int ret; | ||
252 | bool first = true; | ||
253 | |||
254 | if (symbol_conf.exclude_other && !he->parent) | ||
255 | return 0; | ||
256 | |||
257 | perf_hpp__for_each_format(fmt) { | ||
258 | /* | ||
259 | * If there's no field_sep, we still need | ||
260 | * to display initial ' '. | ||
261 | */ | ||
262 | if (!sep || !first) { | ||
263 | ret = scnprintf(hpp->buf, hpp->size, "%s", sep ?: " "); | ||
264 | advance_hpp(hpp, ret); | ||
265 | } else | ||
266 | first = false; | ||
267 | |||
268 | if (color && fmt->color) | ||
269 | ret = fmt->color(fmt, hpp, he); | ||
270 | else | ||
271 | ret = fmt->entry(fmt, hpp, he); | ||
272 | |||
273 | advance_hpp(hpp, ret); | ||
274 | } | ||
275 | |||
276 | return hpp->buf - start; | ||
277 | } | ||
278 | |||
279 | int hist_entry__sort_snprintf(struct hist_entry *he, char *s, size_t size, | 239 | int hist_entry__sort_snprintf(struct hist_entry *he, char *s, size_t size, |
280 | struct hists *hists) | 240 | struct hists *hists) |
281 | { | 241 | { |