Lines Matching refs: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 int hists__update_mem_stat(struct hists *hists, struct hist_entry *he, in hists__update_mem_stat() argument
345 if (he->mem_stat == NULL) { in hists__update_mem_stat()
346 he->mem_stat = calloc(hists->nr_mem_stats, sizeof(*he->mem_stat)); in hists__update_mem_stat()
347 if (he->mem_stat == NULL) in hists__update_mem_stat()
356 he->mem_stat[i].entries[idx] += period; in hists__update_mem_stat()
391 static void hists__decay_mem_stat(struct hists *hists, struct hist_entry *he) in hists__decay_mem_stat() argument
398 he->mem_stat[i].entries[k] = (he->mem_stat[i].entries[k] * 7) / 8; in hists__decay_mem_stat()
402 static void hists__delete_entry(struct hists *hists, struct hist_entry *he);
404 static bool hists__decay_entry(struct hists *hists, struct hist_entry *he) in hists__decay_entry() argument
406 u64 prev_period = he->stat.period; in hists__decay_entry()
407 u64 prev_latency = he->stat.latency; in hists__decay_entry()
412 he_stat__decay(&he->stat); in hists__decay_entry()
414 he_stat__decay(he->stat_acc); in hists__decay_entry()
415 decay_callchain(he->callchain); in hists__decay_entry()
416 hists__decay_mem_stat(hists, he); in hists__decay_entry()
418 if (!he->depth) { in hists__decay_entry()
419 u64 period_diff = prev_period - he->stat.period; in hists__decay_entry()
420 u64 latency_diff = prev_latency - he->stat.latency; in hists__decay_entry()
424 if (!he->filtered) { in hists__decay_entry()
430 if (!he->leaf) { in hists__decay_entry()
432 struct rb_node *node = rb_first_cached(&he->hroot_out); in hists__decay_entry()
442 return he->stat.period == 0 && he->stat.latency == 0; in hists__decay_entry()
445 static void hists__delete_entry(struct hists *hists, struct hist_entry *he) in hists__delete_entry() argument
450 if (he->parent_he) { in hists__delete_entry()
451 root_in = &he->parent_he->hroot_in; in hists__delete_entry()
452 root_out = &he->parent_he->hroot_out; in hists__delete_entry()
461 rb_erase_cached(&he->rb_node_in, root_in); in hists__delete_entry()
462 rb_erase_cached(&he->rb_node, root_out); in hists__delete_entry()
465 if (!he->filtered) in hists__delete_entry()
468 hist_entry__delete(he); in hists__delete_entry()
522 static int hist_entry__init(struct hist_entry *he, in hist_entry__init() argument
527 *he = *template; in hist_entry__init()
528 he->callchain_size = callchain_size; in hist_entry__init()
531 he->stat_acc = malloc(sizeof(he->stat)); in hist_entry__init()
532 if (he->stat_acc == NULL) in hist_entry__init()
534 memcpy(he->stat_acc, &he->stat, sizeof(he->stat)); in hist_entry__init()
536 memset(&he->stat, 0, sizeof(he->stat)); in hist_entry__init()
539 he->ms.thread = thread__get(he->ms.thread); in hist_entry__init()
540 he->ms.map = map__get(he->ms.map); in hist_entry__init()
542 if (he->branch_info) { in hist_entry__init()
548 he->branch_info = malloc(sizeof(*he->branch_info)); in hist_entry__init()
549 if (he->branch_info == NULL) in hist_entry__init()
552 memcpy(he->branch_info, template->branch_info, in hist_entry__init()
553 sizeof(*he->branch_info)); in hist_entry__init()
555 he->branch_info->from.ms.thread = thread__get(he->branch_info->from.ms.thread); in hist_entry__init()
556 he->branch_info->from.ms.map = map__get(he->branch_info->from.ms.map); in hist_entry__init()
557 he->branch_info->to.ms.thread = thread__get(he->branch_info->to.ms.thread); in hist_entry__init()
558 he->branch_info->to.ms.map = map__get(he->branch_info->to.ms.map); in hist_entry__init()
561 if (he->mem_info) { in hist_entry__init()
562 he->mem_info = mem_info__clone(template->mem_info); in hist_entry__init()
563 if (he->mem_info == NULL) in hist_entry__init()
567 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) in hist_entry__init()
568 callchain_init(he->callchain); in hist_entry__init()
570 if (he->raw_data) { in hist_entry__init()
571 he->raw_data = memdup(he->raw_data, he->raw_size); in hist_entry__init()
572 if (he->raw_data == NULL) in hist_entry__init()
576 if (he->srcline && he->srcline != SRCLINE_UNKNOWN) { in hist_entry__init()
577 he->srcline = strdup(he->srcline); in hist_entry__init()
578 if (he->srcline == NULL) in hist_entry__init()
583 he->res_samples = calloc(symbol_conf.res_sample, in hist_entry__init()
585 if (!he->res_samples) in hist_entry__init()
589 INIT_LIST_HEAD(&he->pairs.node); in hist_entry__init()
590 he->thread = thread__get(he->thread); in hist_entry__init()
591 he->hroot_in = RB_ROOT_CACHED; in hist_entry__init()
592 he->hroot_out = RB_ROOT_CACHED; in hist_entry__init()
595 he->leaf = true; in hist_entry__init()
600 zfree(&he->srcline); in hist_entry__init()
603 zfree(&he->raw_data); in hist_entry__init()
606 if (he->branch_info) { in hist_entry__init()
607 map_symbol__exit(&he->branch_info->from.ms); in hist_entry__init()
608 map_symbol__exit(&he->branch_info->to.ms); in hist_entry__init()
609 zfree(&he->branch_info); in hist_entry__init()
611 if (he->mem_info) in hist_entry__init()
612 mem_info__zput(he->mem_info); in hist_entry__init()
614 map_symbol__exit(&he->ms); in hist_entry__init()
615 zfree(&he->stat_acc); in hist_entry__init()
639 struct hist_entry *he; in hist_entry__new() local
648 he = ops->new(callchain_size); in hist_entry__new()
649 if (he) { in hist_entry__new()
650 err = hist_entry__init(he, template, sample_self, callchain_size); in hist_entry__new()
652 ops->free(he); in hist_entry__new()
653 he = NULL; in hist_entry__new()
656 return he; in hist_entry__new()
666 static void hist_entry__add_callchain_period(struct hist_entry *he, u64 period, u64 latency) in hist_entry__add_callchain_period() argument
668 if (!hist_entry__has_callchains(he) || !symbol_conf.use_callchain) in hist_entry__add_callchain_period()
671 he->hists->callchain_period += period; in hist_entry__add_callchain_period()
672 he->hists->callchain_latency += latency; in hist_entry__add_callchain_period()
673 if (!he->filtered) { in hist_entry__add_callchain_period()
674 he->hists->callchain_non_filtered_period += period; in hist_entry__add_callchain_period()
675 he->hists->callchain_non_filtered_latency += latency; in hist_entry__add_callchain_period()
686 struct hist_entry *he; in hists__findnew_entry() local
696 he = rb_entry(parent, struct hist_entry, rb_node_in); in hists__findnew_entry()
704 cmp = hist_entry__cmp(he, entry); in hists__findnew_entry()
707 he_stat__add_stat(&he->stat, &entry->stat); in hists__findnew_entry()
708 hist_entry__add_callchain_period(he, period, latency); in hists__findnew_entry()
711 he_stat__add_period(he->stat_acc, period, latency); in hists__findnew_entry()
723 if (hists__has(hists, sym) && he->ms.map != entry->ms.map) { in hists__findnew_entry()
724 if (he->ms.sym) { in hists__findnew_entry()
725 u64 addr = he->ms.sym->start; in hists__findnew_entry()
726 he->ms.sym = map__find_symbol(entry->ms.map, addr); in hists__findnew_entry()
729 map__put(he->ms.map); in hists__findnew_entry()
730 he->ms.map = map__get(entry->ms.map); in hists__findnew_entry()
743 he = hist_entry__new(entry, sample_self); in hists__findnew_entry()
744 if (!he) in hists__findnew_entry()
748 hist_entry__add_callchain_period(he, period, latency); in hists__findnew_entry()
751 rb_link_node(&he->rb_node_in, parent, p); in hists__findnew_entry()
752 rb_insert_color_cached(&he->rb_node_in, hists->entries_in, leftmost); in hists__findnew_entry()
755 he_stat__add_cpumode_period(&he->stat, al->cpumode, period); in hists__findnew_entry()
757 he_stat__add_cpumode_period(he->stat_acc, al->cpumode, period); in hists__findnew_entry()
758 if (hists__update_mem_stat(hists, he, entry->mem_info, period) < 0) { in hists__findnew_entry()
759 hist_entry__delete(he); in hists__findnew_entry()
762 return he; in hists__findnew_entry()
775 static void hists__res_sample(struct hist_entry *he, struct perf_sample *sample) in hists__res_sample() argument
780 if (he->num_res < symbol_conf.res_sample) { in hists__res_sample()
781 j = he->num_res++; in hists__res_sample()
785 r = &he->res_samples[j]; in hists__res_sample()
849 }, *he = hists__findnew_entry(hists, &entry, al, sample_self); in __hists__add_entry() local
851 if (!hists->has_callchains && he && he->callchain_size != 0) in __hists__add_entry()
853 if (he && symbol_conf.res_sample) in __hists__add_entry()
854 hists__res_sample(he, sample); in __hists__add_entry()
855 return he; in __hists__add_entry()
897 }, *he = hists__findnew_entry(hists, &entry, al, false); in hists__add_entry_block() local
899 return he; in hists__add_entry_block()
937 struct hist_entry *he; in iter_add_single_mem_entry() local
955 he = hists__add_entry(hists, al, iter->parent, NULL, mi, NULL, in iter_add_single_mem_entry()
957 if (!he) in iter_add_single_mem_entry()
960 iter->he = he; in iter_add_single_mem_entry()
970 struct hist_entry *he = iter->he; in iter_finish_mem_entry() local
973 if (he == NULL) in iter_finish_mem_entry()
976 hists__inc_nr_samples(hists, he->filtered); in iter_finish_mem_entry()
978 err = hist_entry__append_callchain(he, iter->sample); in iter_finish_mem_entry()
983 iter->he = NULL; in iter_finish_mem_entry()
1039 struct hist_entry *he = NULL; in iter_add_next_branch_entry() local
1055 he = hists__add_entry(hists, al, iter->parent, &bi[i], NULL, NULL, in iter_add_next_branch_entry()
1057 if (he == NULL) in iter_add_next_branch_entry()
1061 iter->he = he; in iter_add_next_branch_entry()
1084 if (iter->he) in iter_finish_branch_entry()
1085 hists__inc_nr_samples(hists, iter->he->filtered); in iter_finish_branch_entry()
1088 iter->he = NULL; in iter_finish_branch_entry()
1105 struct hist_entry *he; in iter_add_single_normal_entry() local
1107 he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, in iter_add_single_normal_entry()
1109 if (he == NULL) in iter_add_single_normal_entry()
1112 iter->he = he; in iter_add_single_normal_entry()
1120 struct hist_entry *he = iter->he; in iter_finish_normal_entry() local
1124 if (he == NULL) in iter_finish_normal_entry()
1127 iter->he = NULL; in iter_finish_normal_entry()
1129 hists__inc_nr_samples(evsel__hists(evsel), he->filtered); in iter_finish_normal_entry()
1131 return hist_entry__append_callchain(he, sample); in iter_finish_normal_entry()
1169 struct hist_entry *he; in iter_add_single_cumulative_entry() local
1172 he = hists__add_entry(hists, al, iter->parent, NULL, NULL, NULL, in iter_add_single_cumulative_entry()
1174 if (he == NULL) in iter_add_single_cumulative_entry()
1177 iter->he = he; in iter_add_single_cumulative_entry()
1178 he_cache[iter->curr++] = he; in iter_add_single_cumulative_entry()
1180 hist_entry__append_callchain(he, sample); in iter_add_single_cumulative_entry()
1188 hists__inc_nr_samples(hists, he->filtered); in iter_add_single_cumulative_entry()
1227 struct hist_entry *he; in iter_add_next_cumulative_entry() local
1270 iter->he = NULL; in iter_add_next_cumulative_entry()
1275 he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, in iter_add_next_cumulative_entry()
1277 if (he == NULL) in iter_add_next_cumulative_entry()
1280 iter->he = he; in iter_add_next_cumulative_entry()
1281 he_cache[iter->curr++] = he; in iter_add_next_cumulative_entry()
1283 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) in iter_add_next_cumulative_entry()
1284 callchain_append(he->callchain, &cursor, sample->period); in iter_add_next_cumulative_entry()
1295 iter->he = NULL; in iter_finish_cumulative_entry()
1356 if (iter->he && iter->add_entry_cb) { in hist_entry_iter__add()
1367 if (iter->he && iter->add_entry_cb) { in hist_entry_iter__add()
1450 void hist_entry__delete(struct hist_entry *he) in hist_entry__delete() argument
1452 struct hist_entry_ops *ops = he->ops; in hist_entry__delete()
1455 struct rb_root *root = &he->hroot_out.rb_root; in hist_entry__delete()
1464 thread__zput(he->thread); in hist_entry__delete()
1465 map_symbol__exit(&he->ms); in hist_entry__delete()
1467 if (he->branch_info) { in hist_entry__delete()
1468 branch_info__exit(he->branch_info); in hist_entry__delete()
1469 zfree(&he->branch_info); in hist_entry__delete()
1472 if (he->mem_info) { in hist_entry__delete()
1473 map_symbol__exit(&mem_info__iaddr(he->mem_info)->ms); in hist_entry__delete()
1474 map_symbol__exit(&mem_info__daddr(he->mem_info)->ms); in hist_entry__delete()
1475 mem_info__zput(he->mem_info); in hist_entry__delete()
1478 if (he->block_info) in hist_entry__delete()
1479 block_info__delete(he->block_info); in hist_entry__delete()
1481 if (he->kvm_info) in hist_entry__delete()
1482 kvm_info__zput(he->kvm_info); in hist_entry__delete()
1484 zfree(&he->res_samples); in hist_entry__delete()
1485 zfree(&he->stat_acc); in hist_entry__delete()
1486 zfree_srcline(&he->srcline); in hist_entry__delete()
1487 if (he->srcfile && he->srcfile[0]) in hist_entry__delete()
1488 zfree(&he->srcfile); in hist_entry__delete()
1489 free_callchain(he->callchain); in hist_entry__delete()
1490 zfree(&he->trace_output); in hist_entry__delete()
1491 zfree(&he->raw_data); in hist_entry__delete()
1492 zfree(&he->mem_stat); in hist_entry__delete()
1493 ops->free(he); in hist_entry__delete()
1503 int hist_entry__snprintf_alignment(struct hist_entry *he, struct perf_hpp *hpp, in hist_entry__snprintf_alignment() argument
1506 if (!list_is_last(&fmt->list, &he->hists->hpp_list->fields)) { in hist_entry__snprintf_alignment()
1507 const int width = fmt->width(fmt, hpp, he->hists); in hist_entry__snprintf_alignment()
1521 static void hists__apply_filters(struct hists *hists, struct hist_entry *he);
1522 static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *he,
1532 static void hist_entry__check_and_remove_filter(struct hist_entry *he, in hist_entry__check_and_remove_filter() argument
1538 struct hist_entry *parent = he->parent_he; in hist_entry__check_and_remove_filter()
1569 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__check_and_remove_filter()
1583 if (!(he->filtered & (1 << type))) { in hist_entry__check_and_remove_filter()
1600 he->filtered |= (1 << type); in hist_entry__check_and_remove_filter()
1602 he->filtered |= (parent->filtered & (1 << type)); in hist_entry__check_and_remove_filter()
1606 static void hist_entry__apply_hierarchy_filters(struct hist_entry *he) in hist_entry__apply_hierarchy_filters() argument
1608 hist_entry__check_and_remove_filter(he, HIST_FILTER__THREAD, in hist_entry__apply_hierarchy_filters()
1611 hist_entry__check_and_remove_filter(he, HIST_FILTER__DSO, in hist_entry__apply_hierarchy_filters()
1614 hist_entry__check_and_remove_filter(he, HIST_FILTER__SYMBOL, in hist_entry__apply_hierarchy_filters()
1617 hist_entry__check_and_remove_filter(he, HIST_FILTER__PARALLELISM, in hist_entry__apply_hierarchy_filters()
1620 hists__apply_filters(he->hists, he); in hist_entry__apply_hierarchy_filters()
1625 struct hist_entry *he, in hierarchy_insert_entry() argument
1639 cmp = hist_entry__collapse_hierarchy(hpp_list, iter, he); in hierarchy_insert_entry()
1641 he_stat__add_stat(&iter->stat, &he->stat); in hierarchy_insert_entry()
1642 hists__add_mem_stat(hists, iter, he); in hierarchy_insert_entry()
1654 new = hist_entry__new(he, true); in hierarchy_insert_entry()
1669 he->trace_output = NULL; in hierarchy_insert_entry()
1674 he->srcline = NULL; in hierarchy_insert_entry()
1679 he->srcfile = NULL; in hierarchy_insert_entry()
1684 if (hists__clone_mem_stat(hists, new, he) < 0) { in hierarchy_insert_entry()
1696 struct hist_entry *he) in hists__hierarchy_insert_entry() argument
1710 new_he = hierarchy_insert_entry(hists, root, he, parent, &node->hpp); in hists__hierarchy_insert_entry()
1734 he->callchain) < 0) in hists__hierarchy_insert_entry()
1740 hist_entry__delete(he); in hists__hierarchy_insert_entry()
1748 struct hist_entry *he) in hists__collapse_insert_entry() argument
1757 return hists__hierarchy_insert_entry(hists, root, he); in hists__collapse_insert_entry()
1763 cmp = hist_entry__collapse(iter, he); in hists__collapse_insert_entry()
1768 he_stat__add_stat(&iter->stat, &he->stat); in hists__collapse_insert_entry()
1770 he_stat__add_stat(iter->stat_acc, he->stat_acc); in hists__collapse_insert_entry()
1771 hists__add_mem_stat(hists, iter, he); in hists__collapse_insert_entry()
1773 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) { in hists__collapse_insert_entry()
1778 if (callchain_merge(cursor, iter->callchain, he->callchain) < 0) in hists__collapse_insert_entry()
1784 hist_entry__delete(he); in hists__collapse_insert_entry()
1797 rb_link_node(&he->rb_node_in, parent, p); in hists__collapse_insert_entry()
1798 rb_insert_color_cached(&he->rb_node_in, root, leftmost); in hists__collapse_insert_entry()
1817 static void hists__apply_filters(struct hists *hists, struct hist_entry *he) in hists__apply_filters() argument
1819 hists__filter_entry_by_dso(hists, he); in hists__apply_filters()
1820 hists__filter_entry_by_thread(hists, he); in hists__apply_filters()
1821 hists__filter_entry_by_symbol(hists, he); in hists__apply_filters()
1822 hists__filter_entry_by_socket(hists, he); in hists__apply_filters()
1823 hists__filter_entry_by_parallelism(hists, he); in hists__apply_filters()
1903 struct hist_entry *he; in hierarchy_recalc_total_periods() local
1918 he = rb_entry(node, struct hist_entry, rb_node); in hierarchy_recalc_total_periods()
1921 hists->stats.total_period += he->stat.period; in hierarchy_recalc_total_periods()
1922 hists->stats.total_latency += he->stat.latency; in hierarchy_recalc_total_periods()
1923 if (!he->filtered) { in hierarchy_recalc_total_periods()
1924 hists->stats.total_non_filtered_period += he->stat.period; in hierarchy_recalc_total_periods()
1925 hists->stats.total_non_filtered_latency += he->stat.latency; in hierarchy_recalc_total_periods()
1931 struct hist_entry *he) in hierarchy_insert_output_entry() argument
1943 if (hist_entry__sort(he, iter) > 0) in hierarchy_insert_output_entry()
1951 rb_link_node(&he->rb_node, parent, p); in hierarchy_insert_output_entry()
1952 rb_insert_color_cached(&he->rb_node, root, leftmost); in hierarchy_insert_output_entry()
1955 perf_hpp_list__for_each_sort_list(he->hpp_list, fmt) { in hierarchy_insert_output_entry()
1957 fmt->init(fmt, he); in hierarchy_insert_output_entry()
1969 struct hist_entry *he; in hists__hierarchy_output_resort() local
1975 he = rb_entry(node, struct hist_entry, rb_node_in); in hists__hierarchy_output_resort()
1978 hierarchy_insert_output_entry(root_out, he); in hists__hierarchy_output_resort()
1984 if (!he->filtered) { in hists__hierarchy_output_resort()
1986 hists__calc_col_len(hists, he); in hists__hierarchy_output_resort()
1989 if (!he->leaf) { in hists__hierarchy_output_resort()
1991 &he->hroot_in, in hists__hierarchy_output_resort()
1992 &he->hroot_out, in hists__hierarchy_output_resort()
2002 u64 total = he->stat.period; in hists__hierarchy_output_resort()
2005 total = he->stat_acc->period; in hists__hierarchy_output_resort()
2010 callchain_param.sort(&he->sorted_chain, he->callchain, in hists__hierarchy_output_resort()
2016 struct hist_entry *he, in __hists__insert_output_entry() argument
2028 u64 total = he->stat.period; in __hists__insert_output_entry()
2031 total = he->stat_acc->period; in __hists__insert_output_entry()
2035 callchain_param.sort(&he->sorted_chain, he->callchain, in __hists__insert_output_entry()
2043 if (hist_entry__sort(he, iter) > 0) in __hists__insert_output_entry()
2051 rb_link_node(&he->rb_node, parent, p); in __hists__insert_output_entry()
2052 rb_insert_color_cached(&he->rb_node, entries, leftmost); in __hists__insert_output_entry()
2057 fmt->init(fmt, he); in __hists__insert_output_entry()
2147 static bool can_goto_child(struct hist_entry *he, enum hierarchy_move_dir hmd) in can_goto_child() argument
2149 if (he->leaf || hmd == HMD_FORCE_SIBLING) in can_goto_child()
2152 if (he->unfolded || hmd == HMD_FORCE_CHILD) in can_goto_child()
2160 struct hist_entry *he = rb_entry(node, struct hist_entry, rb_node); in rb_hierarchy_last() local
2162 while (can_goto_child(he, HMD_NORMAL)) { in rb_hierarchy_last()
2163 node = rb_last(&he->hroot_out.rb_root); in rb_hierarchy_last()
2164 he = rb_entry(node, struct hist_entry, rb_node); in rb_hierarchy_last()
2171 struct hist_entry *he = rb_entry(node, struct hist_entry, rb_node); in __rb_hierarchy_next() local
2173 if (can_goto_child(he, hmd)) in __rb_hierarchy_next()
2174 node = rb_first_cached(&he->hroot_out); in __rb_hierarchy_next()
2179 he = he->parent_he; in __rb_hierarchy_next()
2180 if (he == NULL) in __rb_hierarchy_next()
2183 node = rb_next(&he->rb_node); in __rb_hierarchy_next()
2190 struct hist_entry *he = rb_entry(node, struct hist_entry, rb_node); in rb_hierarchy_prev() local
2196 he = he->parent_he; in rb_hierarchy_prev()
2197 if (he == NULL) in rb_hierarchy_prev()
2200 return &he->rb_node; in rb_hierarchy_prev()
2203 bool hist_entry__has_hierarchy_children(struct hist_entry *he, float limit) in hist_entry__has_hierarchy_children() argument
2209 if (he->leaf) in hist_entry__has_hierarchy_children()
2212 node = rb_first_cached(&he->hroot_out); in hist_entry__has_hierarchy_children()
2271 struct hist_entry *he) in hists__filter_entry_by_dso() argument
2274 (he->ms.map == NULL || !RC_CHK_EQUAL(map__dso(he->ms.map), hists->dso_filter))) { in hists__filter_entry_by_dso()
2275 he->filtered |= (1 << HIST_FILTER__DSO); in hists__filter_entry_by_dso()
2283 struct hist_entry *he) in hists__filter_entry_by_thread() argument
2286 !RC_CHK_EQUAL(he->thread, hists->thread_filter)) { in hists__filter_entry_by_thread()
2287 he->filtered |= (1 << HIST_FILTER__THREAD); in hists__filter_entry_by_thread()
2295 struct hist_entry *he) in hists__filter_entry_by_symbol() argument
2298 (!he->ms.sym || strstr(he->ms.sym->name, in hists__filter_entry_by_symbol()
2300 he->filtered |= (1 << HIST_FILTER__SYMBOL); in hists__filter_entry_by_symbol()
2308 struct hist_entry *he) in hists__filter_entry_by_socket() argument
2311 (he->socket != hists->socket_filter)) { in hists__filter_entry_by_socket()
2312 he->filtered |= (1 << HIST_FILTER__SOCKET); in hists__filter_entry_by_socket()
2320 struct hist_entry *he) in hists__filter_entry_by_parallelism() argument
2322 if (test_bit(he->parallelism, hists->parallelism_filter)) { in hists__filter_entry_by_parallelism()
2323 he->filtered |= (1 << HIST_FILTER__PARALLELISM); in hists__filter_entry_by_parallelism()
2329 typedef bool (*filter_fn_t)(struct hists *hists, struct hist_entry *he);
2351 struct hist_entry *he) in resort_filtered_entry() argument
2364 if (hist_entry__sort(he, iter) > 0) in resort_filtered_entry()
2372 rb_link_node(&he->rb_node, parent, p); in resort_filtered_entry()
2373 rb_insert_color_cached(&he->rb_node, root, leftmost); in resort_filtered_entry()
2375 if (he->leaf || he->filtered) in resort_filtered_entry()
2378 nd = rb_first_cached(&he->hroot_out); in resort_filtered_entry()
2383 rb_erase_cached(&h->rb_node, &he->hroot_out); in resort_filtered_entry()
2388 he->hroot_out = new_root; in resort_filtered_entry()
2547 struct hist_entry *he; in hists__add_dummy_entry() local
2560 he = rb_entry(parent, struct hist_entry, rb_node_in); in hists__add_dummy_entry()
2562 cmp = hist_entry__collapse(he, pair); in hists__add_dummy_entry()
2575 he = hist_entry__new(pair, true); in hists__add_dummy_entry()
2576 if (he) { in hists__add_dummy_entry()
2577 memset(&he->stat, 0, sizeof(he->stat)); in hists__add_dummy_entry()
2578 he->hists = hists; in hists__add_dummy_entry()
2580 memset(he->stat_acc, 0, sizeof(he->stat)); in hists__add_dummy_entry()
2581 rb_link_node(&he->rb_node_in, parent, p); in hists__add_dummy_entry()
2582 rb_insert_color_cached(&he->rb_node_in, root, leftmost); in hists__add_dummy_entry()
2583 hists__inc_stats(hists, he); in hists__add_dummy_entry()
2584 he->dummy = true; in hists__add_dummy_entry()
2587 return he; in hists__add_dummy_entry()
2596 struct hist_entry *he; in add_dummy_hierarchy_entry() local
2604 he = rb_entry(parent, struct hist_entry, rb_node_in); in add_dummy_hierarchy_entry()
2605 cmp = hist_entry__collapse_hierarchy(he->hpp_list, he, pair); in add_dummy_hierarchy_entry()
2617 he = hist_entry__new(pair, true); in add_dummy_hierarchy_entry()
2618 if (he) { in add_dummy_hierarchy_entry()
2619 rb_link_node(&he->rb_node_in, parent, p); in add_dummy_hierarchy_entry()
2620 rb_insert_color_cached(&he->rb_node_in, root, leftmost); in add_dummy_hierarchy_entry()
2622 he->dummy = true; in add_dummy_hierarchy_entry()
2623 he->hists = hists; in add_dummy_hierarchy_entry()
2624 memset(&he->stat, 0, sizeof(he->stat)); in add_dummy_hierarchy_entry()
2625 hists__inc_stats(hists, he); in add_dummy_hierarchy_entry()
2628 return he; in add_dummy_hierarchy_entry()
2632 struct hist_entry *he) in hists__find_entry() argument
2643 int64_t cmp = hist_entry__collapse(iter, he); in hists__find_entry()
2657 struct hist_entry *he) in hists__find_hierarchy_entry() argument
2666 cmp = hist_entry__collapse_hierarchy(he->hpp_list, iter, he); in hists__find_hierarchy_entry()
3029 struct hist_entry *he; in hists__delete_remaining_entries() local
3035 he = rb_entry(node, struct hist_entry, rb_node_in); in hists__delete_remaining_entries()
3036 hist_entry__delete(he); in hists__delete_remaining_entries()