Lines Matching refs:hde
2358 static int hde_width(struct hpp_dynamic_entry *hde) in hde_width() argument
2360 if (!hde->hpp.len) { in hde_width()
2361 int len = hde->dynamic_len; in hde_width()
2362 int namelen = strlen(hde->field->name); in hde_width()
2363 int fieldlen = hde->field->size; in hde_width()
2368 if (!(hde->field->flags & TEP_FIELD_IS_STRING)) { in hde_width()
2370 fieldlen = hde->field->size * 2 + 2; in hde_width()
2375 hde->hpp.len = len; in hde_width()
2377 return hde->hpp.len; in hde_width()
2380 static void update_dynamic_len(struct hpp_dynamic_entry *hde, in update_dynamic_len() argument
2384 struct tep_format_field *field = hde->field; in update_dynamic_len()
2388 if (hde->raw_trace) in update_dynamic_len()
2411 if (len > hde->dynamic_len) in update_dynamic_len()
2412 hde->dynamic_len = len; in update_dynamic_len()
2428 struct hpp_dynamic_entry *hde; in __sort__hde_header() local
2431 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_header()
2434 len = hde_width(hde); in __sort__hde_header()
2436 return scnprintf(hpp->buf, hpp->size, "%*.*s", len, len, hde->field->name); in __sort__hde_header()
2443 struct hpp_dynamic_entry *hde; in __sort__hde_width() local
2446 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_width()
2449 len = hde_width(hde); in __sort__hde_width()
2456 struct hpp_dynamic_entry *hde; in perf_hpp__defined_dynamic_entry() local
2458 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in perf_hpp__defined_dynamic_entry()
2460 return hists_to_evsel(hists) == hde->evsel; in perf_hpp__defined_dynamic_entry()
2466 struct hpp_dynamic_entry *hde; in __sort__hde_entry() local
2474 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_entry()
2477 len = hde_width(hde); in __sort__hde_entry()
2479 if (hde->raw_trace) in __sort__hde_entry()
2485 field = hde->field; in __sort__hde_entry()
2516 tep_print_field(&seq, he->raw_data, hde->field); in __sort__hde_entry()
2528 struct hpp_dynamic_entry *hde; in __sort__hde_cmp() local
2532 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in __sort__hde_cmp()
2535 update_dynamic_len(hde, a); in __sort__hde_cmp()
2539 field = hde->field; in __sort__hde_cmp()
2550 if (size > hde->dynamic_len) in __sort__hde_cmp()
2551 hde->dynamic_len = size; in __sort__hde_cmp()
2581 struct hpp_dynamic_entry *hde; in hde_free() local
2583 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in hde_free()
2584 free(hde); in hde_free()
2591 struct hpp_dynamic_entry *hde; in __alloc_dynamic_entry() local
2593 hde = malloc(sizeof(*hde)); in __alloc_dynamic_entry()
2594 if (hde == NULL) { in __alloc_dynamic_entry()
2599 hde->evsel = evsel; in __alloc_dynamic_entry()
2600 hde->field = field; in __alloc_dynamic_entry()
2601 hde->dynamic_len = 0; in __alloc_dynamic_entry()
2603 hde->hpp.name = field->name; in __alloc_dynamic_entry()
2604 hde->hpp.header = __sort__hde_header; in __alloc_dynamic_entry()
2605 hde->hpp.width = __sort__hde_width; in __alloc_dynamic_entry()
2606 hde->hpp.entry = __sort__hde_entry; in __alloc_dynamic_entry()
2607 hde->hpp.color = NULL; in __alloc_dynamic_entry()
2609 hde->hpp.cmp = __sort__hde_cmp; in __alloc_dynamic_entry()
2610 hde->hpp.collapse = __sort__hde_cmp; in __alloc_dynamic_entry()
2611 hde->hpp.sort = __sort__hde_cmp; in __alloc_dynamic_entry()
2612 hde->hpp.equal = __sort__hde_equal; in __alloc_dynamic_entry()
2613 hde->hpp.free = hde_free; in __alloc_dynamic_entry()
2615 INIT_LIST_HEAD(&hde->hpp.list); in __alloc_dynamic_entry()
2616 INIT_LIST_HEAD(&hde->hpp.sort_list); in __alloc_dynamic_entry()
2617 hde->hpp.elide = false; in __alloc_dynamic_entry()
2618 hde->hpp.len = 0; in __alloc_dynamic_entry()
2619 hde->hpp.user_len = 0; in __alloc_dynamic_entry()
2620 hde->hpp.level = level; in __alloc_dynamic_entry()
2622 return hde; in __alloc_dynamic_entry()
2637 struct hpp_dynamic_entry *hde, *new_hde; in perf_hpp_fmt__dup() local
2639 hde = container_of(fmt, struct hpp_dynamic_entry, hpp); in perf_hpp_fmt__dup()
2640 new_hde = memdup(hde, sizeof(*hde)); in perf_hpp_fmt__dup()
2726 struct hpp_dynamic_entry *hde; in __dynamic_dimension__add() local
2728 hde = __alloc_dynamic_entry(evsel, field, level); in __dynamic_dimension__add()
2729 if (hde == NULL) in __dynamic_dimension__add()
2732 hde->raw_trace = raw_trace; in __dynamic_dimension__add()
2734 perf_hpp__register_sort_field(&hde->hpp); in __dynamic_dimension__add()