Lines Matching refs:fmt
42 static int repsep_snprintf(char *bf, size_t size, const char *fmt, ...) in repsep_snprintf() argument
47 va_start(ap, fmt); in repsep_snprintf()
48 n = vsnprintf(bf, size, fmt, ap); in repsep_snprintf()
1599 struct perf_hpp_fmt *fmt; member
1603 #define DIM(d, n) { .name = n, .fmt = &perf_hpp__format[d], }
1623 void perf_hpp__reset_sort_width(struct perf_hpp_fmt *fmt, struct hists *hists) in perf_hpp__reset_sort_width() argument
1627 if (!perf_hpp__is_sort_entry(fmt)) in perf_hpp__reset_sort_width()
1630 hse = container_of(fmt, struct hpp_sort_entry, hpp); in perf_hpp__reset_sort_width()
1631 hists__new_col_len(hists, hse->se->se_width_idx, strlen(fmt->name)); in perf_hpp__reset_sort_width()
1634 static int __sort__hpp_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, in __sort__hpp_header() argument
1639 size_t len = fmt->user_len; in __sort__hpp_header()
1641 hse = container_of(fmt, struct hpp_sort_entry, hpp); in __sort__hpp_header()
1646 return scnprintf(hpp->buf, hpp->size, "%-*.*s", len, len, fmt->name); in __sort__hpp_header()
1649 static int __sort__hpp_width(struct perf_hpp_fmt *fmt, in __sort__hpp_width() argument
1654 size_t len = fmt->user_len; in __sort__hpp_width()
1656 hse = container_of(fmt, struct hpp_sort_entry, hpp); in __sort__hpp_width()
1664 static int __sort__hpp_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, in __sort__hpp_entry() argument
1668 size_t len = fmt->user_len; in __sort__hpp_entry()
1670 hse = container_of(fmt, struct hpp_sort_entry, hpp); in __sort__hpp_entry()
1678 static int64_t __sort__hpp_cmp(struct perf_hpp_fmt *fmt, in __sort__hpp_cmp() argument
1683 hse = container_of(fmt, struct hpp_sort_entry, hpp); in __sort__hpp_cmp()
1687 static int64_t __sort__hpp_collapse(struct perf_hpp_fmt *fmt, in __sort__hpp_collapse() argument
1693 hse = container_of(fmt, struct hpp_sort_entry, hpp); in __sort__hpp_collapse()
1698 static int64_t __sort__hpp_sort(struct perf_hpp_fmt *fmt, in __sort__hpp_sort() argument
1704 hse = container_of(fmt, struct hpp_sort_entry, hpp); in __sort__hpp_sort()
1715 bool perf_hpp__is_ ## key ## _entry(struct perf_hpp_fmt *fmt) \
1719 if (!perf_hpp__is_sort_entry(fmt)) \
1722 hse = container_of(fmt, struct hpp_sort_entry, hpp); \
1749 static void hse_free(struct perf_hpp_fmt *fmt) in hse_free() argument
1753 hse = container_of(fmt, struct hpp_sort_entry, hpp); in hse_free()
1791 static void hpp_free(struct perf_hpp_fmt *fmt) in hpp_free() argument
1793 free(fmt); in hpp_free()
1799 struct perf_hpp_fmt *fmt; in __hpp_dimension__alloc_hpp() local
1801 fmt = memdup(hd->fmt, sizeof(*fmt)); in __hpp_dimension__alloc_hpp()
1802 if (fmt) { in __hpp_dimension__alloc_hpp()
1803 INIT_LIST_HEAD(&fmt->list); in __hpp_dimension__alloc_hpp()
1804 INIT_LIST_HEAD(&fmt->sort_list); in __hpp_dimension__alloc_hpp()
1805 fmt->free = hpp_free; in __hpp_dimension__alloc_hpp()
1806 fmt->level = level; in __hpp_dimension__alloc_hpp()
1809 return fmt; in __hpp_dimension__alloc_hpp()
1814 struct perf_hpp_fmt *fmt; in hist_entry__filter() local
1819 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__filter()
1820 if (!perf_hpp__is_sort_entry(fmt)) in hist_entry__filter()
1823 hse = container_of(fmt, struct hpp_sort_entry, hpp); in hist_entry__filter()
1940 static int __sort__hde_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, in __sort__hde_header() argument
1946 size_t len = fmt->user_len; in __sort__hde_header()
1948 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_header()
1956 static int __sort__hde_width(struct perf_hpp_fmt *fmt, in __sort__hde_width() argument
1961 size_t len = fmt->user_len; in __sort__hde_width()
1963 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_width()
1971 bool perf_hpp__defined_dynamic_entry(struct perf_hpp_fmt *fmt, struct hists *hists) in perf_hpp__defined_dynamic_entry() argument
1975 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in perf_hpp__defined_dynamic_entry()
1980 static int __sort__hde_entry(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, in __sort__hde_entry() argument
1984 size_t len = fmt->user_len; in __sort__hde_entry()
1991 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_entry()
2042 static int64_t __sort__hde_cmp(struct perf_hpp_fmt *fmt, in __sort__hde_cmp() argument
2049 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_cmp()
2075 bool perf_hpp__is_dynamic_entry(struct perf_hpp_fmt *fmt) in perf_hpp__is_dynamic_entry() argument
2077 return fmt->cmp == __sort__hde_cmp; in perf_hpp__is_dynamic_entry()
2094 static void hde_free(struct perf_hpp_fmt *fmt) in hde_free() argument
2098 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in hde_free()
2140 struct perf_hpp_fmt *perf_hpp_fmt__dup(struct perf_hpp_fmt *fmt) in perf_hpp_fmt__dup() argument
2144 if (perf_hpp__is_sort_entry(fmt)) { in perf_hpp_fmt__dup()
2147 hse = container_of(fmt, struct hpp_sort_entry, hpp); in perf_hpp_fmt__dup()
2151 } else if (perf_hpp__is_dynamic_entry(fmt)) { in perf_hpp_fmt__dup()
2154 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in perf_hpp_fmt__dup()
2159 new_fmt = memdup(fmt, sizeof(*fmt)); in perf_hpp_fmt__dup()
2401 struct perf_hpp_fmt *fmt; in __hpp_dimension__add() local
2406 fmt = __hpp_dimension__alloc_hpp(hd, level); in __hpp_dimension__add()
2407 if (!fmt) in __hpp_dimension__add()
2411 perf_hpp_list__register_sort_field(list, fmt); in __hpp_dimension__add()
2431 struct perf_hpp_fmt *fmt; in __hpp_dimension__add_output() local
2436 fmt = __hpp_dimension__alloc_hpp(hd, 0); in __hpp_dimension__add_output()
2437 if (!fmt) in __hpp_dimension__add_output()
2441 perf_hpp_list__column_register(list, fmt); in __hpp_dimension__add_output()
2737 struct perf_hpp_fmt *fmt; in perf_hpp__set_elide() local
2740 perf_hpp_list__for_each_format(&perf_hpp_list, fmt) { in perf_hpp__set_elide()
2741 if (!perf_hpp__is_sort_entry(fmt)) in perf_hpp__set_elide()
2744 hse = container_of(fmt, struct hpp_sort_entry, hpp); in perf_hpp__set_elide()
2746 fmt->elide = elide; in perf_hpp__set_elide()
2797 struct perf_hpp_fmt *fmt; in sort__setup_elide() local
2800 perf_hpp_list__for_each_format(&perf_hpp_list, fmt) { in sort__setup_elide()
2801 if (!perf_hpp__is_sort_entry(fmt)) in sort__setup_elide()
2804 hse = container_of(fmt, struct hpp_sort_entry, hpp); in sort__setup_elide()
2805 fmt->elide = get_elide(hse->se->se_width_idx, output); in sort__setup_elide()
2812 perf_hpp_list__for_each_format(&perf_hpp_list, fmt) { in sort__setup_elide()
2813 if (!perf_hpp__is_sort_entry(fmt)) in sort__setup_elide()
2816 if (!fmt->elide) in sort__setup_elide()
2820 perf_hpp_list__for_each_format(&perf_hpp_list, fmt) { in sort__setup_elide()
2821 if (!perf_hpp__is_sort_entry(fmt)) in sort__setup_elide()
2824 fmt->elide = false; in sort__setup_elide()