Lines Matching full:he
39 struct hist_entry *he);
41 struct hist_entry *he);
43 struct hist_entry *he);
45 struct hist_entry *he);
47 struct hist_entry *he);
339 static void hists__delete_entry(struct hists *hists, struct hist_entry *he);
341 static bool hists__decay_entry(struct hists *hists, struct hist_entry *he) in hists__decay_entry() argument
343 u64 prev_period = he->stat.period; in hists__decay_entry()
344 u64 prev_latency = he->stat.latency; in hists__decay_entry()
349 he_stat__decay(&he->stat); in hists__decay_entry()
351 he_stat__decay(he->stat_acc); in hists__decay_entry()
352 decay_callchain(he->callchain); in hists__decay_entry()
354 if (!he->depth) { in hists__decay_entry()
355 u64 period_diff = prev_period - he->stat.period; in hists__decay_entry()
356 u64 latency_diff = prev_latency - he->stat.latency; in hists__decay_entry()
360 if (!he->filtered) { in hists__decay_entry()
366 if (!he->leaf) { in hists__decay_entry()
368 struct rb_node *node = rb_first_cached(&he->hroot_out); in hists__decay_entry()
378 return he->stat.period == 0 && he->stat.latency == 0; in hists__decay_entry()
381 static void hists__delete_entry(struct hists *hists, struct hist_entry *he) in hists__delete_entry() argument
386 if (he->parent_he) { in hists__delete_entry()
387 root_in = &he->parent_he->hroot_in; in hists__delete_entry()
388 root_out = &he->parent_he->hroot_out; in hists__delete_entry()
397 rb_erase_cached(&he->rb_node_in, root_in); in hists__delete_entry()
398 rb_erase_cached(&he->rb_node, root_out); in hists__delete_entry()
401 if (!he->filtered) in hists__delete_entry()
404 hist_entry__delete(he); in hists__delete_entry()
458 static int hist_entry__init(struct hist_entry *he, in hist_entry__init() argument
463 *he = *template; in hist_entry__init()
464 he->callchain_size = callchain_size; in hist_entry__init()
467 he->stat_acc = malloc(sizeof(he->stat)); in hist_entry__init()
468 if (he->stat_acc == NULL) in hist_entry__init()
470 memcpy(he->stat_acc, &he->stat, sizeof(he->stat)); in hist_entry__init()
472 memset(&he->stat, 0, sizeof(he->stat)); in hist_entry__init()
475 he->ms.maps = maps__get(he->ms.maps); in hist_entry__init()
476 he->ms.map = map__get(he->ms.map); in hist_entry__init()
478 if (he->branch_info) { in hist_entry__init()
484 he->branch_info = malloc(sizeof(*he->branch_info)); in hist_entry__init()
485 if (he->branch_info == NULL) in hist_entry__init()
488 memcpy(he->branch_info, template->branch_info, in hist_entry__init()
489 sizeof(*he->branch_info)); in hist_entry__init()
491 he->branch_info->from.ms.maps = maps__get(he->branch_info->from.ms.maps); in hist_entry__init()
492 he->branch_info->from.ms.map = map__get(he->branch_info->from.ms.map); in hist_entry__init()
493 he->branch_info->to.ms.maps = maps__get(he->branch_info->to.ms.maps); in hist_entry__init()
494 he->branch_info->to.ms.map = map__get(he->branch_info->to.ms.map); in hist_entry__init()
497 if (he->mem_info) { in hist_entry__init()
498 he->mem_info = mem_info__clone(template->mem_info); in hist_entry__init()
499 if (he->mem_info == NULL) in hist_entry__init()
503 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) in hist_entry__init()
504 callchain_init(he->callchain); in hist_entry__init()
506 if (he->raw_data) { in hist_entry__init()
507 he->raw_data = memdup(he->raw_data, he->raw_size); in hist_entry__init()
508 if (he->raw_data == NULL) in hist_entry__init()
512 if (he->srcline && he->srcline != SRCLINE_UNKNOWN) { in hist_entry__init()
513 he->srcline = strdup(he->srcline); in hist_entry__init()
514 if (he->srcline == NULL) in hist_entry__init()
519 he->res_samples = calloc(symbol_conf.res_sample, in hist_entry__init()
521 if (!he->res_samples) in hist_entry__init()
525 INIT_LIST_HEAD(&he->pairs.node); in hist_entry__init()
526 he->thread = thread__get(he->thread); in hist_entry__init()
527 he->hroot_in = RB_ROOT_CACHED; in hist_entry__init()
528 he->hroot_out = RB_ROOT_CACHED; in hist_entry__init()
531 he->leaf = true; in hist_entry__init()
536 zfree(&he->srcline); in hist_entry__init()
539 zfree(&he->raw_data); in hist_entry__init()
542 if (he->branch_info) { in hist_entry__init()
543 map_symbol__exit(&he->branch_info->from.ms); in hist_entry__init()
544 map_symbol__exit(&he->branch_info->to.ms); in hist_entry__init()
545 zfree(&he->branch_info); in hist_entry__init()
547 if (he->mem_info) { in hist_entry__init()
548 map_symbol__exit(&mem_info__iaddr(he->mem_info)->ms); in hist_entry__init()
549 map_symbol__exit(&mem_info__daddr(he->mem_info)->ms); in hist_entry__init()
552 map_symbol__exit(&he->ms); in hist_entry__init()
553 zfree(&he->stat_acc); in hist_entry__init()
577 struct hist_entry *he; in hist_entry__new() local
586 he = ops->new(callchain_size); in hist_entry__new()
587 if (he) { in hist_entry__new()
588 err = hist_entry__init(he, template, sample_self, callchain_size); in hist_entry__new()
590 ops->free(he); in hist_entry__new()
591 he = NULL; in hist_entry__new()
594 return he; in hist_entry__new()
604 static void hist_entry__add_callchain_period(struct hist_entry *he, u64 period, u64 latency) in hist_entry__add_callchain_period() argument
606 if (!hist_entry__has_callchains(he) || !symbol_conf.use_callchain) in hist_entry__add_callchain_period()
609 he->hists->callchain_period += period; in hist_entry__add_callchain_period()
610 he->hists->callchain_latency += latency; in hist_entry__add_callchain_period()
611 if (!he->filtered) { in hist_entry__add_callchain_period()
612 he->hists->callchain_non_filtered_period += period; in hist_entry__add_callchain_period()
613 he->hists->callchain_non_filtered_latency += latency; in hist_entry__add_callchain_period()
624 struct hist_entry *he; in hists__findnew_entry() local
634 he = rb_entry(parent, struct hist_entry, rb_node_in); in hists__findnew_entry()
642 cmp = hist_entry__cmp(he, entry); in hists__findnew_entry()
645 he_stat__add_stat(&he->stat, &entry->stat); in hists__findnew_entry()
646 hist_entry__add_callchain_period(he, period, latency); in hists__findnew_entry()
649 he_stat__add_period(he->stat_acc, period, latency); in hists__findnew_entry()
661 if (hists__has(hists, sym) && he->ms.map != entry->ms.map) { in hists__findnew_entry()
662 if (he->ms.sym) { in hists__findnew_entry()
663 u64 addr = he->ms.sym->start; in hists__findnew_entry()
664 he->ms.sym = map__find_symbol(entry->ms.map, addr); in hists__findnew_entry()
667 map__put(he->ms.map); in hists__findnew_entry()
668 he->ms.map = map__get(entry->ms.map); in hists__findnew_entry()
681 he = hist_entry__new(entry, sample_self); in hists__findnew_entry()
682 if (!he) in hists__findnew_entry()
686 hist_entry__add_callchain_period(he, period, latency); in hists__findnew_entry()
689 rb_link_node(&he->rb_node_in, parent, p); in hists__findnew_entry()
690 rb_insert_color_cached(&he->rb_node_in, hists->entries_in, leftmost); in hists__findnew_entry()
693 he_stat__add_cpumode_period(&he->stat, al->cpumode, period); in hists__findnew_entry()
695 he_stat__add_cpumode_period(he->stat_acc, al->cpumode, period); in hists__findnew_entry()
696 return he; in hists__findnew_entry()
709 static void hists__res_sample(struct hist_entry *he, struct perf_sample *sample) in hists__res_sample() argument
714 if (he->num_res < symbol_conf.res_sample) { in hists__res_sample()
715 j = he->num_res++; in hists__res_sample()
719 r = &he->res_samples[j]; in hists__res_sample()
783 }, *he = hists__findnew_entry(hists, &entry, al, sample_self); in __hists__add_entry() local
785 if (!hists->has_callchains && he && he->callchain_size != 0) in __hists__add_entry()
787 if (he && symbol_conf.res_sample) in __hists__add_entry()
788 hists__res_sample(he, sample); in __hists__add_entry()
789 return he; in __hists__add_entry()
831 }, *he = hists__findnew_entry(hists, &entry, al, false); in hists__add_entry_block() local
833 return he; in hists__add_entry_block()
871 struct hist_entry *he; in iter_add_single_mem_entry() local
889 he = hists__add_entry(hists, al, iter->parent, NULL, mi, NULL, in iter_add_single_mem_entry()
891 if (!he) in iter_add_single_mem_entry()
894 iter->he = he; in iter_add_single_mem_entry()
904 struct hist_entry *he = iter->he; in iter_finish_mem_entry() local
907 if (he == NULL) in iter_finish_mem_entry()
910 hists__inc_nr_samples(hists, he->filtered); in iter_finish_mem_entry()
912 err = hist_entry__append_callchain(he, iter->sample); in iter_finish_mem_entry()
917 iter->he = NULL; in iter_finish_mem_entry()
973 struct hist_entry *he = NULL; in iter_add_next_branch_entry() local
989 he = hists__add_entry(hists, al, iter->parent, &bi[i], NULL, NULL, in iter_add_next_branch_entry()
991 if (he == NULL) in iter_add_next_branch_entry()
995 iter->he = he; in iter_add_next_branch_entry()
1018 if (iter->he) in iter_finish_branch_entry()
1019 hists__inc_nr_samples(hists, iter->he->filtered); in iter_finish_branch_entry()
1022 iter->he = NULL; in iter_finish_branch_entry()
1039 struct hist_entry *he; in iter_add_single_normal_entry() local
1041 he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, in iter_add_single_normal_entry()
1043 if (he == NULL) in iter_add_single_normal_entry()
1046 iter->he = he; in iter_add_single_normal_entry()
1054 struct hist_entry *he = iter->he; in iter_finish_normal_entry() local
1058 if (he == NULL) in iter_finish_normal_entry()
1061 iter->he = NULL; in iter_finish_normal_entry()
1063 hists__inc_nr_samples(evsel__hists(evsel), he->filtered); in iter_finish_normal_entry()
1065 return hist_entry__append_callchain(he, sample); in iter_finish_normal_entry()
1103 struct hist_entry *he; in iter_add_single_cumulative_entry() local
1106 he = hists__add_entry(hists, al, iter->parent, NULL, NULL, NULL, in iter_add_single_cumulative_entry()
1108 if (he == NULL) in iter_add_single_cumulative_entry()
1111 iter->he = he; in iter_add_single_cumulative_entry()
1112 he_cache[iter->curr++] = he; in iter_add_single_cumulative_entry()
1114 hist_entry__append_callchain(he, sample); in iter_add_single_cumulative_entry()
1122 hists__inc_nr_samples(hists, he->filtered); in iter_add_single_cumulative_entry()
1161 struct hist_entry *he; in iter_add_next_cumulative_entry() local
1204 iter->he = NULL; in iter_add_next_cumulative_entry()
1209 he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, in iter_add_next_cumulative_entry()
1211 if (he == NULL) in iter_add_next_cumulative_entry()
1214 iter->he = he; in iter_add_next_cumulative_entry()
1215 he_cache[iter->curr++] = he; in iter_add_next_cumulative_entry()
1217 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) in iter_add_next_cumulative_entry()
1218 callchain_append(he->callchain, &cursor, sample->period); in iter_add_next_cumulative_entry()
1229 iter->he = NULL; in iter_finish_cumulative_entry()
1290 if (iter->he && iter->add_entry_cb) { in hist_entry_iter__add()
1301 if (iter->he && iter->add_entry_cb) { in hist_entry_iter__add()
1384 void hist_entry__delete(struct hist_entry *he) in hist_entry__delete() argument
1386 struct hist_entry_ops *ops = he->ops; in hist_entry__delete()
1389 struct rb_root *root = &he->hroot_out.rb_root; in hist_entry__delete()
1398 thread__zput(he->thread); in hist_entry__delete()
1399 map_symbol__exit(&he->ms); in hist_entry__delete()
1401 if (he->branch_info) { in hist_entry__delete()
1402 branch_info__exit(he->branch_info); in hist_entry__delete()
1403 zfree(&he->branch_info); in hist_entry__delete()
1406 if (he->mem_info) { in hist_entry__delete()
1407 map_symbol__exit(&mem_info__iaddr(he->mem_info)->ms); in hist_entry__delete()
1408 map_symbol__exit(&mem_info__daddr(he->mem_info)->ms); in hist_entry__delete()
1409 mem_info__zput(he->mem_info); in hist_entry__delete()
1412 if (he->block_info) in hist_entry__delete()
1413 block_info__delete(he->block_info); in hist_entry__delete()
1415 if (he->kvm_info) in hist_entry__delete()
1416 kvm_info__zput(he->kvm_info); in hist_entry__delete()
1418 zfree(&he->res_samples); in hist_entry__delete()
1419 zfree(&he->stat_acc); in hist_entry__delete()
1420 zfree_srcline(&he->srcline); in hist_entry__delete()
1421 if (he->srcfile && he->srcfile[0]) in hist_entry__delete()
1422 zfree(&he->srcfile); in hist_entry__delete()
1423 free_callchain(he->callchain); in hist_entry__delete()
1424 zfree(&he->trace_output); in hist_entry__delete()
1425 zfree(&he->raw_data); in hist_entry__delete()
1426 ops->free(he); in hist_entry__delete()
1436 int hist_entry__snprintf_alignment(struct hist_entry *he, struct perf_hpp *hpp, in hist_entry__snprintf_alignment() argument
1439 if (!list_is_last(&fmt->list, &he->hists->hpp_list->fields)) { in hist_entry__snprintf_alignment()
1440 const int width = fmt->width(fmt, hpp, he->hists); in hist_entry__snprintf_alignment()
1454 static void hists__apply_filters(struct hists *hists, struct hist_entry *he);
1455 static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *he,
1465 static void hist_entry__check_and_remove_filter(struct hist_entry *he, in hist_entry__check_and_remove_filter() argument
1471 struct hist_entry *parent = he->parent_he; in hist_entry__check_and_remove_filter()
1502 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__check_and_remove_filter()
1516 if (!(he->filtered & (1 << type))) { in hist_entry__check_and_remove_filter()
1533 he->filtered |= (1 << type); in hist_entry__check_and_remove_filter()
1535 he->filtered |= (parent->filtered & (1 << type)); in hist_entry__check_and_remove_filter()
1539 static void hist_entry__apply_hierarchy_filters(struct hist_entry *he) in hist_entry__apply_hierarchy_filters() argument
1541 hist_entry__check_and_remove_filter(he, HIST_FILTER__THREAD, in hist_entry__apply_hierarchy_filters()
1544 hist_entry__check_and_remove_filter(he, HIST_FILTER__DSO, in hist_entry__apply_hierarchy_filters()
1547 hist_entry__check_and_remove_filter(he, HIST_FILTER__SYMBOL, in hist_entry__apply_hierarchy_filters()
1550 hist_entry__check_and_remove_filter(he, HIST_FILTER__PARALLELISM, in hist_entry__apply_hierarchy_filters()
1553 hists__apply_filters(he->hists, he); in hist_entry__apply_hierarchy_filters()
1558 struct hist_entry *he, in hierarchy_insert_entry() argument
1572 cmp = hist_entry__collapse_hierarchy(hpp_list, iter, he); in hierarchy_insert_entry()
1574 he_stat__add_stat(&iter->stat, &he->stat); in hierarchy_insert_entry()
1586 new = hist_entry__new(he, true); in hierarchy_insert_entry()
1601 he->trace_output = NULL; in hierarchy_insert_entry()
1606 he->srcline = NULL; in hierarchy_insert_entry()
1611 he->srcfile = NULL; in hierarchy_insert_entry()
1623 struct hist_entry *he) in hists__hierarchy_insert_entry() argument
1636 /* insert copy of 'he' for each fmt into the hierarchy */ in hists__hierarchy_insert_entry()
1637 new_he = hierarchy_insert_entry(hists, root, he, parent, &node->hpp); in hists__hierarchy_insert_entry()
1661 he->callchain) < 0) in hists__hierarchy_insert_entry()
1666 /* 'he' is no longer used */ in hists__hierarchy_insert_entry()
1667 hist_entry__delete(he); in hists__hierarchy_insert_entry()
1675 struct hist_entry *he) in hists__collapse_insert_entry() argument
1684 return hists__hierarchy_insert_entry(hists, root, he); in hists__collapse_insert_entry()
1690 cmp = hist_entry__collapse(iter, he); in hists__collapse_insert_entry()
1695 he_stat__add_stat(&iter->stat, &he->stat); in hists__collapse_insert_entry()
1697 he_stat__add_stat(iter->stat_acc, he->stat_acc); in hists__collapse_insert_entry()
1699 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) { in hists__collapse_insert_entry()
1704 if (callchain_merge(cursor, iter->callchain, he->callchain) < 0) in hists__collapse_insert_entry()
1710 hist_entry__delete(he); in hists__collapse_insert_entry()
1723 rb_link_node(&he->rb_node_in, parent, p); in hists__collapse_insert_entry()
1724 rb_insert_color_cached(&he->rb_node_in, root, leftmost); in hists__collapse_insert_entry()
1743 static void hists__apply_filters(struct hists *hists, struct hist_entry *he) in hists__apply_filters() argument
1745 hists__filter_entry_by_dso(hists, he); in hists__apply_filters()
1746 hists__filter_entry_by_thread(hists, he); in hists__apply_filters()
1747 hists__filter_entry_by_symbol(hists, he); in hists__apply_filters()
1748 hists__filter_entry_by_socket(hists, he); in hists__apply_filters()
1749 hists__filter_entry_by_parallelism(hists, he); in hists__apply_filters()
1829 struct hist_entry *he; in hierarchy_recalc_total_periods() local
1844 he = rb_entry(node, struct hist_entry, rb_node); in hierarchy_recalc_total_periods()
1847 hists->stats.total_period += he->stat.period; in hierarchy_recalc_total_periods()
1848 hists->stats.total_latency += he->stat.latency; in hierarchy_recalc_total_periods()
1849 if (!he->filtered) { in hierarchy_recalc_total_periods()
1850 hists->stats.total_non_filtered_period += he->stat.period; in hierarchy_recalc_total_periods()
1851 hists->stats.total_non_filtered_latency += he->stat.latency; in hierarchy_recalc_total_periods()
1857 struct hist_entry *he) in hierarchy_insert_output_entry() argument
1869 if (hist_entry__sort(he, iter) > 0) in hierarchy_insert_output_entry()
1877 rb_link_node(&he->rb_node, parent, p); in hierarchy_insert_output_entry()
1878 rb_insert_color_cached(&he->rb_node, root, leftmost); in hierarchy_insert_output_entry()
1881 perf_hpp_list__for_each_sort_list(he->hpp_list, fmt) { in hierarchy_insert_output_entry()
1883 fmt->init(fmt, he); in hierarchy_insert_output_entry()
1895 struct hist_entry *he; in hists__hierarchy_output_resort() local
1901 he = rb_entry(node, struct hist_entry, rb_node_in); in hists__hierarchy_output_resort()
1904 hierarchy_insert_output_entry(root_out, he); in hists__hierarchy_output_resort()
1910 if (!he->filtered) { in hists__hierarchy_output_resort()
1912 hists__calc_col_len(hists, he); in hists__hierarchy_output_resort()
1915 if (!he->leaf) { in hists__hierarchy_output_resort()
1917 &he->hroot_in, in hists__hierarchy_output_resort()
1918 &he->hroot_out, in hists__hierarchy_output_resort()
1928 u64 total = he->stat.period; in hists__hierarchy_output_resort()
1931 total = he->stat_acc->period; in hists__hierarchy_output_resort()
1936 callchain_param.sort(&he->sorted_chain, he->callchain, in hists__hierarchy_output_resort()
1942 struct hist_entry *he, in __hists__insert_output_entry() argument
1954 u64 total = he->stat.period; in __hists__insert_output_entry()
1957 total = he->stat_acc->period; in __hists__insert_output_entry()
1961 callchain_param.sort(&he->sorted_chain, he->callchain, in __hists__insert_output_entry()
1969 if (hist_entry__sort(he, iter) > 0) in __hists__insert_output_entry()
1977 rb_link_node(&he->rb_node, parent, p); in __hists__insert_output_entry()
1978 rb_insert_color_cached(&he->rb_node, entries, leftmost); in __hists__insert_output_entry()
1983 fmt->init(fmt, he); in __hists__insert_output_entry()
2073 static bool can_goto_child(struct hist_entry *he, enum hierarchy_move_dir hmd) in can_goto_child() argument
2075 if (he->leaf || hmd == HMD_FORCE_SIBLING) in can_goto_child()
2078 if (he->unfolded || hmd == HMD_FORCE_CHILD) in can_goto_child()
2086 struct hist_entry *he = rb_entry(node, struct hist_entry, rb_node); in rb_hierarchy_last() local
2088 while (can_goto_child(he, HMD_NORMAL)) { in rb_hierarchy_last()
2089 node = rb_last(&he->hroot_out.rb_root); in rb_hierarchy_last()
2090 he = rb_entry(node, struct hist_entry, rb_node); in rb_hierarchy_last()
2097 struct hist_entry *he = rb_entry(node, struct hist_entry, rb_node); in __rb_hierarchy_next() local
2099 if (can_goto_child(he, hmd)) in __rb_hierarchy_next()
2100 node = rb_first_cached(&he->hroot_out); in __rb_hierarchy_next()
2105 he = he->parent_he; in __rb_hierarchy_next()
2106 if (he == NULL) in __rb_hierarchy_next()
2109 node = rb_next(&he->rb_node); in __rb_hierarchy_next()
2116 struct hist_entry *he = rb_entry(node, struct hist_entry, rb_node); in rb_hierarchy_prev() local
2122 he = he->parent_he; in rb_hierarchy_prev()
2123 if (he == NULL) in rb_hierarchy_prev()
2126 return &he->rb_node; in rb_hierarchy_prev()
2129 bool hist_entry__has_hierarchy_children(struct hist_entry *he, float limit) in hist_entry__has_hierarchy_children() argument
2135 if (he->leaf) in hist_entry__has_hierarchy_children()
2138 node = rb_first_cached(&he->hroot_out); in hist_entry__has_hierarchy_children()
2197 struct hist_entry *he) in hists__filter_entry_by_dso() argument
2200 (he->ms.map == NULL || !RC_CHK_EQUAL(map__dso(he->ms.map), hists->dso_filter))) { in hists__filter_entry_by_dso()
2201 he->filtered |= (1 << HIST_FILTER__DSO); in hists__filter_entry_by_dso()
2209 struct hist_entry *he) in hists__filter_entry_by_thread() argument
2212 !RC_CHK_EQUAL(he->thread, hists->thread_filter)) { in hists__filter_entry_by_thread()
2213 he->filtered |= (1 << HIST_FILTER__THREAD); in hists__filter_entry_by_thread()
2221 struct hist_entry *he) in hists__filter_entry_by_symbol() argument
2224 (!he->ms.sym || strstr(he->ms.sym->name, in hists__filter_entry_by_symbol()
2226 he->filtered |= (1 << HIST_FILTER__SYMBOL); in hists__filter_entry_by_symbol()
2234 struct hist_entry *he) in hists__filter_entry_by_socket() argument
2237 (he->socket != hists->socket_filter)) { in hists__filter_entry_by_socket()
2238 he->filtered |= (1 << HIST_FILTER__SOCKET); in hists__filter_entry_by_socket()
2246 struct hist_entry *he) in hists__filter_entry_by_parallelism() argument
2248 if (test_bit(he->parallelism, hists->parallelism_filter)) { in hists__filter_entry_by_parallelism()
2249 he->filtered |= (1 << HIST_FILTER__PARALLELISM); in hists__filter_entry_by_parallelism()
2255 typedef bool (*filter_fn_t)(struct hists *hists, struct hist_entry *he);
2277 struct hist_entry *he) in resort_filtered_entry() argument
2290 if (hist_entry__sort(he, iter) > 0) in resort_filtered_entry()
2298 rb_link_node(&he->rb_node, parent, p); in resort_filtered_entry()
2299 rb_insert_color_cached(&he->rb_node, root, leftmost); in resort_filtered_entry()
2301 if (he->leaf || he->filtered) in resort_filtered_entry()
2304 nd = rb_first_cached(&he->hroot_out); in resort_filtered_entry()
2309 rb_erase_cached(&h->rb_node, &he->hroot_out); in resort_filtered_entry()
2314 he->hroot_out = new_root; in resort_filtered_entry()
2473 struct hist_entry *he; in hists__add_dummy_entry() local
2486 he = rb_entry(parent, struct hist_entry, rb_node_in); in hists__add_dummy_entry()
2488 cmp = hist_entry__collapse(he, pair); in hists__add_dummy_entry()
2501 he = hist_entry__new(pair, true); in hists__add_dummy_entry()
2502 if (he) { in hists__add_dummy_entry()
2503 memset(&he->stat, 0, sizeof(he->stat)); in hists__add_dummy_entry()
2504 he->hists = hists; in hists__add_dummy_entry()
2506 memset(he->stat_acc, 0, sizeof(he->stat)); in hists__add_dummy_entry()
2507 rb_link_node(&he->rb_node_in, parent, p); in hists__add_dummy_entry()
2508 rb_insert_color_cached(&he->rb_node_in, root, leftmost); in hists__add_dummy_entry()
2509 hists__inc_stats(hists, he); in hists__add_dummy_entry()
2510 he->dummy = true; in hists__add_dummy_entry()
2513 return he; in hists__add_dummy_entry()
2522 struct hist_entry *he; in add_dummy_hierarchy_entry() local
2530 he = rb_entry(parent, struct hist_entry, rb_node_in); in add_dummy_hierarchy_entry()
2531 cmp = hist_entry__collapse_hierarchy(he->hpp_list, he, pair); in add_dummy_hierarchy_entry()
2543 he = hist_entry__new(pair, true); in add_dummy_hierarchy_entry()
2544 if (he) { in add_dummy_hierarchy_entry()
2545 rb_link_node(&he->rb_node_in, parent, p); in add_dummy_hierarchy_entry()
2546 rb_insert_color_cached(&he->rb_node_in, root, leftmost); in add_dummy_hierarchy_entry()
2548 he->dummy = true; in add_dummy_hierarchy_entry()
2549 he->hists = hists; in add_dummy_hierarchy_entry()
2550 memset(&he->stat, 0, sizeof(he->stat)); in add_dummy_hierarchy_entry()
2551 hists__inc_stats(hists, he); in add_dummy_hierarchy_entry()
2554 return he; in add_dummy_hierarchy_entry()
2558 struct hist_entry *he) in hists__find_entry() argument
2569 int64_t cmp = hist_entry__collapse(iter, he); in hists__find_entry()
2583 struct hist_entry *he) in hists__find_hierarchy_entry() argument
2592 cmp = hist_entry__collapse_hierarchy(he->hpp_list, iter, he); in hists__find_hierarchy_entry()
2955 struct hist_entry *he; in hists__delete_remaining_entries() local
2961 he = rb_entry(node, struct hist_entry, rb_node_in); in hists__delete_remaining_entries()
2962 hist_entry__delete(he); in hists__delete_remaining_entries()