Lines Matching refs:hde

2541 static int hde_width(struct hpp_dynamic_entry *hde)  in hde_width()  argument
2543 if (!hde->hpp.len) { in hde_width()
2544 int len = hde->dynamic_len; in hde_width()
2545 int namelen = strlen(hde->field->name); in hde_width()
2546 int fieldlen = hde->field->size; in hde_width()
2551 if (!(hde->field->flags & TEP_FIELD_IS_STRING)) { in hde_width()
2553 fieldlen = hde->field->size * 2 + 2; in hde_width()
2558 hde->hpp.len = len; in hde_width()
2560 return hde->hpp.len; in hde_width()
2563 static void update_dynamic_len(struct hpp_dynamic_entry *hde, in update_dynamic_len() argument
2567 struct tep_format_field *field = hde->field; in update_dynamic_len()
2571 if (hde->raw_trace) in update_dynamic_len()
2594 if (len > hde->dynamic_len) in update_dynamic_len()
2595 hde->dynamic_len = len; in update_dynamic_len()
2611 struct hpp_dynamic_entry *hde; in __sort__hde_header() local
2614 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_header()
2617 len = hde_width(hde); in __sort__hde_header()
2619 return scnprintf(hpp->buf, hpp->size, "%*.*s", len, len, hde->field->name); in __sort__hde_header()
2626 struct hpp_dynamic_entry *hde; in __sort__hde_width() local
2629 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_width()
2632 len = hde_width(hde); in __sort__hde_width()
2639 struct hpp_dynamic_entry *hde; in perf_hpp__defined_dynamic_entry() local
2641 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in perf_hpp__defined_dynamic_entry()
2643 return hists_to_evsel(hists) == hde->evsel; in perf_hpp__defined_dynamic_entry()
2649 struct hpp_dynamic_entry *hde; in __sort__hde_entry() local
2657 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_entry()
2660 len = hde_width(hde); in __sort__hde_entry()
2662 if (hde->raw_trace) in __sort__hde_entry()
2668 field = hde->field; in __sort__hde_entry()
2699 tep_print_field(&seq, he->raw_data, hde->field); in __sort__hde_entry()
2711 struct hpp_dynamic_entry *hde; in __sort__hde_cmp() local
2715 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_cmp()
2717 field = hde->field; in __sort__hde_cmp()
2727 if (size > hde->dynamic_len) in __sort__hde_cmp()
2728 hde->dynamic_len = size; in __sort__hde_cmp()
2758 struct hpp_dynamic_entry *hde; in hde_free() local
2760 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in hde_free()
2761 free(hde); in hde_free()
2766 struct hpp_dynamic_entry *hde; in __sort__hde_init() local
2771 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_init()
2772 update_dynamic_len(hde, he); in __sort__hde_init()
2779 struct hpp_dynamic_entry *hde; in __alloc_dynamic_entry() local
2781 hde = malloc(sizeof(*hde)); in __alloc_dynamic_entry()
2782 if (hde == NULL) { in __alloc_dynamic_entry()
2787 hde->evsel = evsel; in __alloc_dynamic_entry()
2788 hde->field = field; in __alloc_dynamic_entry()
2789 hde->dynamic_len = 0; in __alloc_dynamic_entry()
2791 hde->hpp.name = field->name; in __alloc_dynamic_entry()
2792 hde->hpp.header = __sort__hde_header; in __alloc_dynamic_entry()
2793 hde->hpp.width = __sort__hde_width; in __alloc_dynamic_entry()
2794 hde->hpp.entry = __sort__hde_entry; in __alloc_dynamic_entry()
2795 hde->hpp.color = NULL; in __alloc_dynamic_entry()
2797 hde->hpp.init = __sort__hde_init; in __alloc_dynamic_entry()
2798 hde->hpp.cmp = __sort__hde_cmp; in __alloc_dynamic_entry()
2799 hde->hpp.collapse = __sort__hde_cmp; in __alloc_dynamic_entry()
2800 hde->hpp.sort = __sort__hde_cmp; in __alloc_dynamic_entry()
2801 hde->hpp.equal = __sort__hde_equal; in __alloc_dynamic_entry()
2802 hde->hpp.free = hde_free; in __alloc_dynamic_entry()
2804 INIT_LIST_HEAD(&hde->hpp.list); in __alloc_dynamic_entry()
2805 INIT_LIST_HEAD(&hde->hpp.sort_list); in __alloc_dynamic_entry()
2806 hde->hpp.elide = false; in __alloc_dynamic_entry()
2807 hde->hpp.len = 0; in __alloc_dynamic_entry()
2808 hde->hpp.user_len = 0; in __alloc_dynamic_entry()
2809 hde->hpp.level = level; in __alloc_dynamic_entry()
2811 return hde; in __alloc_dynamic_entry()
2828 struct hpp_dynamic_entry *hde, *new_hde; in perf_hpp_fmt__dup() local
2830 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in perf_hpp_fmt__dup()
2831 new_hde = memdup(hde, sizeof(*hde)); in perf_hpp_fmt__dup()
2919 struct hpp_dynamic_entry *hde; in __dynamic_dimension__add() local
2921 hde = __alloc_dynamic_entry(evsel, field, level); in __dynamic_dimension__add()
2922 if (hde == NULL) in __dynamic_dimension__add()
2925 hde->raw_trace = raw_trace; in __dynamic_dimension__add()
2927 perf_hpp__register_sort_field(&hde->hpp); in __dynamic_dimension__add()