Lines Matching refs:hpp
21 #define hpp__call_print_fn(hpp, fn, fmt, ...) \ argument
23 int __ret = fn(hpp, fmt, ##__VA_ARGS__); \
24 advance_hpp(hpp, __ret); \
28 static int __hpp__fmt_print(struct perf_hpp *hpp, struct hists *hists, u64 val, in __hpp__fmt_print() argument
40 return hpp__call_print_fn(hpp, print_fn, fmt, len, percent); in __hpp__fmt_print()
46 return hpp__call_print_fn(hpp, print_fn, fmt, len, avg); in __hpp__fmt_print()
49 return hpp__call_print_fn(hpp, print_fn, fmt, len, val); in __hpp__fmt_print()
58 static int __hpp__fmt(struct perf_hpp *hpp, struct hist_entry *he, in __hpp__fmt() argument
66 char *buf = hpp->buf; in __hpp__fmt()
67 size_t size = hpp->size; in __hpp__fmt()
105 ret += __hpp__fmt_print(hpp, values[i].hists, values[i].val, in __hpp__fmt()
116 hpp->buf = buf; in __hpp__fmt()
117 hpp->size = size; in __hpp__fmt()
122 int hpp__fmt(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, in hpp__fmt() argument
130 return __hpp__fmt(hpp, he, get_field, fmtstr, 1, in hpp__fmt()
139 return __hpp__fmt(hpp, he, get_field, fmtstr, len, print_fn, fmtype); in hpp__fmt()
142 int hpp__fmt_acc(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, in hpp__fmt_acc() argument
149 return snprintf(hpp->buf, hpp->size, " %*s", len - 1, "N/A"); in hpp__fmt_acc()
152 return hpp__fmt(fmt, hpp, he, get_field, fmtstr, print_fn, fmtype); in hpp__fmt_acc()
155 int hpp__fmt_mem_stat(struct perf_hpp_fmt *fmt __maybe_unused, struct perf_hpp *hpp, in hpp__fmt_mem_stat() argument
161 char *buf = hpp->buf; in hpp__fmt_mem_stat()
162 size_t size = hpp->size; in hpp__fmt_mem_stat()
184 ret += hpp__call_print_fn(hpp, print_fn, fmtstr, 100.0 * val / total); in hpp__fmt_mem_stat()
191 hpp->buf = buf; in hpp__fmt_mem_stat()
192 hpp->size = size; in hpp__fmt_mem_stat()
373 struct perf_hpp *hpp __maybe_unused, in hpp__width_fn()
398 static int hpp__header_fn(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, in hpp__header_fn() argument
402 int len = hpp__width_fn(fmt, hpp, hists); in hpp__header_fn()
408 return scnprintf(hpp->buf, hpp->size, "%*s", len, hdr); in hpp__header_fn()
411 static int hpp__header_mem_stat_fn(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, in hpp__header_mem_stat_fn() argument
415 char *buf = hpp->buf; in hpp__header_mem_stat_fn()
442 return scnprintf(hpp->buf, hpp->size, "%*s", len, fmt->name); in hpp__header_mem_stat_fn()
452 return scnprintf(hpp->buf, hpp->size, "%.*s %s %.*s", in hpp__header_mem_stat_fn()
457 len = hpp->size; in hpp__header_mem_stat_fn()
473 int hpp_color_scnprintf(struct perf_hpp *hpp, const char *fmt, ...) in hpp_color_scnprintf() argument
476 ssize_t ssize = hpp->size; in hpp_color_scnprintf()
483 ret = percent_color_len_snprintf(hpp->buf, hpp->size, fmt, len, percent); in hpp_color_scnprintf()
489 static int hpp_entry_scnprintf(struct perf_hpp *hpp, const char *fmt, ...) in hpp_entry_scnprintf() argument
492 ssize_t ssize = hpp->size; in hpp_entry_scnprintf()
496 ret = vsnprintf(hpp->buf, hpp->size, fmt, args); in hpp_entry_scnprintf()
509 struct perf_hpp *hpp, struct hist_entry *he) \
511 return hpp__fmt(fmt, hpp, he, he_get_##_field, " %*.2f%%", \
517 struct perf_hpp *hpp, struct hist_entry *he) \
519 return hpp__fmt(fmt, hpp, he, he_get_##_field, " %*.2f%%", \
537 struct perf_hpp *hpp, struct hist_entry *he) \
539 return hpp__fmt_acc(fmt, hpp, he, he_get_acc_##_field, " %*.2f%%", \
545 struct perf_hpp *hpp, struct hist_entry *he) \
547 return hpp__fmt_acc(fmt, hpp, he, he_get_acc_##_field, " %*.2f%%", \
565 struct perf_hpp *hpp, struct hist_entry *he) \
567 return hpp__fmt(fmt, hpp, he, he_get_raw_##_field, " %*"PRIu64, \
585 struct perf_hpp *hpp, struct hist_entry *he) \
587 return hpp__fmt(fmt, hpp, he, he_get_##_field, " %*.1f", \
600 struct perf_hpp *hpp, \
603 return hpp__fmt_mem_stat(fmt, hpp, he, PERF_MEM_STAT_##_type, \
609 struct perf_hpp *hpp, \
612 return hpp__fmt_mem_stat(fmt, hpp, he, PERF_MEM_STAT_##_type, \
936 perf_hpp_list__for_each_format_safe(&node->hpp, fmt, tmp) { in perf_hpp__cancel_cumulate()
972 perf_hpp_list__for_each_format_safe(&node->hpp, fmt, tmp) { in perf_hpp__cancel_latency()
1144 perf_hpp_list__for_each_format(&node->hpp, fmt) in hists__reset_column_width()
1188 perf_hpp_list__init(&node->hpp); in add_hierarchy_fmt()
1201 list_add_tail(&fmt_copy->list, &node->hpp.fields); in add_hierarchy_fmt()
1202 list_add_tail(&fmt_copy->sort_list, &node->hpp.sorts); in add_hierarchy_fmt()