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 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.maps = maps__get(he->ms.maps); 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.maps = maps__get(he->branch_info->from.ms.maps); 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.maps = maps__get(he->branch_info->to.ms.maps); 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 map_symbol__exit(&mem_info__iaddr(he->mem_info)->ms); in hist_entry__init()
613 map_symbol__exit(&mem_info__daddr(he->mem_info)->ms); in hist_entry__init()
616 map_symbol__exit(&he->ms); in hist_entry__init()
617 zfree(&he->stat_acc); in hist_entry__init()
641 struct hist_entry *he; in hist_entry__new() local
650 he = ops->new(callchain_size); in hist_entry__new()
651 if (he) { in hist_entry__new()
652 err = hist_entry__init(he, template, sample_self, callchain_size); in hist_entry__new()
654 ops->free(he); in hist_entry__new()
655 he = NULL; in hist_entry__new()
658 return he; in hist_entry__new()
668 static void hist_entry__add_callchain_period(struct hist_entry *he, u64 period, u64 latency) in hist_entry__add_callchain_period() argument
670 if (!hist_entry__has_callchains(he) || !symbol_conf.use_callchain) in hist_entry__add_callchain_period()
673 he->hists->callchain_period += period; in hist_entry__add_callchain_period()
674 he->hists->callchain_latency += latency; in hist_entry__add_callchain_period()
675 if (!he->filtered) { in hist_entry__add_callchain_period()
676 he->hists->callchain_non_filtered_period += period; in hist_entry__add_callchain_period()
677 he->hists->callchain_non_filtered_latency += latency; in hist_entry__add_callchain_period()
688 struct hist_entry *he; in hists__findnew_entry() local
698 he = rb_entry(parent, struct hist_entry, rb_node_in); in hists__findnew_entry()
706 cmp = hist_entry__cmp(he, entry); in hists__findnew_entry()
709 he_stat__add_stat(&he->stat, &entry->stat); in hists__findnew_entry()
710 hist_entry__add_callchain_period(he, period, latency); in hists__findnew_entry()
713 he_stat__add_period(he->stat_acc, period, latency); in hists__findnew_entry()
725 if (hists__has(hists, sym) && he->ms.map != entry->ms.map) { in hists__findnew_entry()
726 if (he->ms.sym) { in hists__findnew_entry()
727 u64 addr = he->ms.sym->start; in hists__findnew_entry()
728 he->ms.sym = map__find_symbol(entry->ms.map, addr); in hists__findnew_entry()
731 map__put(he->ms.map); in hists__findnew_entry()
732 he->ms.map = map__get(entry->ms.map); in hists__findnew_entry()
745 he = hist_entry__new(entry, sample_self); in hists__findnew_entry()
746 if (!he) in hists__findnew_entry()
750 hist_entry__add_callchain_period(he, period, latency); in hists__findnew_entry()
753 rb_link_node(&he->rb_node_in, parent, p); in hists__findnew_entry()
754 rb_insert_color_cached(&he->rb_node_in, hists->entries_in, leftmost); in hists__findnew_entry()
757 he_stat__add_cpumode_period(&he->stat, al->cpumode, period); in hists__findnew_entry()
759 he_stat__add_cpumode_period(he->stat_acc, al->cpumode, period); in hists__findnew_entry()
760 if (hists__update_mem_stat(hists, he, entry->mem_info, period) < 0) { in hists__findnew_entry()
761 hist_entry__delete(he); in hists__findnew_entry()
764 return he; in hists__findnew_entry()
777 static void hists__res_sample(struct hist_entry *he, struct perf_sample *sample) in hists__res_sample() argument
782 if (he->num_res < symbol_conf.res_sample) { in hists__res_sample()
783 j = he->num_res++; in hists__res_sample()
787 r = &he->res_samples[j]; in hists__res_sample()
851 }, *he = hists__findnew_entry(hists, &entry, al, sample_self); in __hists__add_entry() local
853 if (!hists->has_callchains && he && he->callchain_size != 0) in __hists__add_entry()
855 if (he && symbol_conf.res_sample) in __hists__add_entry()
856 hists__res_sample(he, sample); in __hists__add_entry()
857 return he; in __hists__add_entry()
899 }, *he = hists__findnew_entry(hists, &entry, al, false); in hists__add_entry_block() local
901 return he; in hists__add_entry_block()
939 struct hist_entry *he; in iter_add_single_mem_entry() local
957 he = hists__add_entry(hists, al, iter->parent, NULL, mi, NULL, in iter_add_single_mem_entry()
959 if (!he) in iter_add_single_mem_entry()
962 iter->he = he; in iter_add_single_mem_entry()
972 struct hist_entry *he = iter->he; in iter_finish_mem_entry() local
975 if (he == NULL) in iter_finish_mem_entry()
978 hists__inc_nr_samples(hists, he->filtered); in iter_finish_mem_entry()
980 err = hist_entry__append_callchain(he, iter->sample); in iter_finish_mem_entry()
985 iter->he = NULL; in iter_finish_mem_entry()
1041 struct hist_entry *he = NULL; in iter_add_next_branch_entry() local
1057 he = hists__add_entry(hists, al, iter->parent, &bi[i], NULL, NULL, in iter_add_next_branch_entry()
1059 if (he == NULL) in iter_add_next_branch_entry()
1063 iter->he = he; in iter_add_next_branch_entry()
1086 if (iter->he) in iter_finish_branch_entry()
1087 hists__inc_nr_samples(hists, iter->he->filtered); in iter_finish_branch_entry()
1090 iter->he = NULL; in iter_finish_branch_entry()
1107 struct hist_entry *he; in iter_add_single_normal_entry() local
1109 he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, in iter_add_single_normal_entry()
1111 if (he == NULL) in iter_add_single_normal_entry()
1114 iter->he = he; in iter_add_single_normal_entry()
1122 struct hist_entry *he = iter->he; in iter_finish_normal_entry() local
1126 if (he == NULL) in iter_finish_normal_entry()
1129 iter->he = NULL; in iter_finish_normal_entry()
1131 hists__inc_nr_samples(evsel__hists(evsel), he->filtered); in iter_finish_normal_entry()
1133 return hist_entry__append_callchain(he, sample); in iter_finish_normal_entry()
1171 struct hist_entry *he; in iter_add_single_cumulative_entry() local
1174 he = hists__add_entry(hists, al, iter->parent, NULL, NULL, NULL, in iter_add_single_cumulative_entry()
1176 if (he == NULL) in iter_add_single_cumulative_entry()
1179 iter->he = he; in iter_add_single_cumulative_entry()
1180 he_cache[iter->curr++] = he; in iter_add_single_cumulative_entry()
1182 hist_entry__append_callchain(he, sample); in iter_add_single_cumulative_entry()
1190 hists__inc_nr_samples(hists, he->filtered); in iter_add_single_cumulative_entry()
1229 struct hist_entry *he; in iter_add_next_cumulative_entry() local
1272 iter->he = NULL; in iter_add_next_cumulative_entry()
1277 he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, in iter_add_next_cumulative_entry()
1279 if (he == NULL) in iter_add_next_cumulative_entry()
1282 iter->he = he; in iter_add_next_cumulative_entry()
1283 he_cache[iter->curr++] = he; in iter_add_next_cumulative_entry()
1285 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) in iter_add_next_cumulative_entry()
1286 callchain_append(he->callchain, &cursor, sample->period); in iter_add_next_cumulative_entry()
1297 iter->he = NULL; in iter_finish_cumulative_entry()
1358 if (iter->he && iter->add_entry_cb) { in hist_entry_iter__add()
1369 if (iter->he && iter->add_entry_cb) { in hist_entry_iter__add()
1452 void hist_entry__delete(struct hist_entry *he) in hist_entry__delete() argument
1454 struct hist_entry_ops *ops = he->ops; in hist_entry__delete()
1457 struct rb_root *root = &he->hroot_out.rb_root; in hist_entry__delete()
1466 thread__zput(he->thread); in hist_entry__delete()
1467 map_symbol__exit(&he->ms); in hist_entry__delete()
1469 if (he->branch_info) { in hist_entry__delete()
1470 branch_info__exit(he->branch_info); in hist_entry__delete()
1471 zfree(&he->branch_info); in hist_entry__delete()
1474 if (he->mem_info) { in hist_entry__delete()
1475 map_symbol__exit(&mem_info__iaddr(he->mem_info)->ms); in hist_entry__delete()
1476 map_symbol__exit(&mem_info__daddr(he->mem_info)->ms); in hist_entry__delete()
1477 mem_info__zput(he->mem_info); in hist_entry__delete()
1480 if (he->block_info) in hist_entry__delete()
1481 block_info__delete(he->block_info); in hist_entry__delete()
1483 if (he->kvm_info) in hist_entry__delete()
1484 kvm_info__zput(he->kvm_info); in hist_entry__delete()
1486 zfree(&he->res_samples); in hist_entry__delete()
1487 zfree(&he->stat_acc); in hist_entry__delete()
1488 zfree_srcline(&he->srcline); in hist_entry__delete()
1489 if (he->srcfile && he->srcfile[0]) in hist_entry__delete()
1490 zfree(&he->srcfile); in hist_entry__delete()
1491 free_callchain(he->callchain); in hist_entry__delete()
1492 zfree(&he->trace_output); in hist_entry__delete()
1493 zfree(&he->raw_data); in hist_entry__delete()
1494 zfree(&he->mem_stat); in hist_entry__delete()
1495 ops->free(he); in hist_entry__delete()
1505 int hist_entry__snprintf_alignment(struct hist_entry *he, struct perf_hpp *hpp, in hist_entry__snprintf_alignment() argument
1508 if (!list_is_last(&fmt->list, &he->hists->hpp_list->fields)) { in hist_entry__snprintf_alignment()
1509 const int width = fmt->width(fmt, hpp, he->hists); in hist_entry__snprintf_alignment()
1523 static void hists__apply_filters(struct hists *hists, struct hist_entry *he);
1524 static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *he,
1534 static void hist_entry__check_and_remove_filter(struct hist_entry *he, in hist_entry__check_and_remove_filter() argument
1540 struct hist_entry *parent = he->parent_he; in hist_entry__check_and_remove_filter()
1571 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_entry__check_and_remove_filter()
1585 if (!(he->filtered & (1 << type))) { in hist_entry__check_and_remove_filter()
1602 he->filtered |= (1 << type); in hist_entry__check_and_remove_filter()
1604 he->filtered |= (parent->filtered & (1 << type)); in hist_entry__check_and_remove_filter()
1608 static void hist_entry__apply_hierarchy_filters(struct hist_entry *he) in hist_entry__apply_hierarchy_filters() argument
1610 hist_entry__check_and_remove_filter(he, HIST_FILTER__THREAD, in hist_entry__apply_hierarchy_filters()
1613 hist_entry__check_and_remove_filter(he, HIST_FILTER__DSO, in hist_entry__apply_hierarchy_filters()
1616 hist_entry__check_and_remove_filter(he, HIST_FILTER__SYMBOL, in hist_entry__apply_hierarchy_filters()
1619 hist_entry__check_and_remove_filter(he, HIST_FILTER__PARALLELISM, in hist_entry__apply_hierarchy_filters()
1622 hists__apply_filters(he->hists, he); in hist_entry__apply_hierarchy_filters()
1627 struct hist_entry *he, in hierarchy_insert_entry() argument
1641 cmp = hist_entry__collapse_hierarchy(hpp_list, iter, he); in hierarchy_insert_entry()
1643 he_stat__add_stat(&iter->stat, &he->stat); in hierarchy_insert_entry()
1644 hists__add_mem_stat(hists, iter, he); in hierarchy_insert_entry()
1656 new = hist_entry__new(he, true); in hierarchy_insert_entry()
1671 he->trace_output = NULL; in hierarchy_insert_entry()
1676 he->srcline = NULL; in hierarchy_insert_entry()
1681 he->srcfile = NULL; in hierarchy_insert_entry()
1686 if (hists__clone_mem_stat(hists, new, he) < 0) { in hierarchy_insert_entry()
1698 struct hist_entry *he) in hists__hierarchy_insert_entry() argument
1711 /* insert copy of 'he' for each fmt into the hierarchy */ in hists__hierarchy_insert_entry()
1712 new_he = hierarchy_insert_entry(hists, root, he, parent, &node->hpp); in hists__hierarchy_insert_entry()
1736 he->callchain) < 0) in hists__hierarchy_insert_entry()
1741 /* 'he' is no longer used */ in hists__hierarchy_insert_entry()
1742 hist_entry__delete(he); in hists__hierarchy_insert_entry()
1750 struct hist_entry *he) in hists__collapse_insert_entry() argument
1759 return hists__hierarchy_insert_entry(hists, root, he); in hists__collapse_insert_entry()
1765 cmp = hist_entry__collapse(iter, he); in hists__collapse_insert_entry()
1770 he_stat__add_stat(&iter->stat, &he->stat); in hists__collapse_insert_entry()
1772 he_stat__add_stat(iter->stat_acc, he->stat_acc); in hists__collapse_insert_entry()
1773 hists__add_mem_stat(hists, iter, he); in hists__collapse_insert_entry()
1775 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) { in hists__collapse_insert_entry()
1780 if (callchain_merge(cursor, iter->callchain, he->callchain) < 0) in hists__collapse_insert_entry()
1786 hist_entry__delete(he); in hists__collapse_insert_entry()
1799 rb_link_node(&he->rb_node_in, parent, p); in hists__collapse_insert_entry()
1800 rb_insert_color_cached(&he->rb_node_in, root, leftmost); in hists__collapse_insert_entry()
1819 static void hists__apply_filters(struct hists *hists, struct hist_entry *he) in hists__apply_filters() argument
1821 hists__filter_entry_by_dso(hists, he); in hists__apply_filters()
1822 hists__filter_entry_by_thread(hists, he); in hists__apply_filters()
1823 hists__filter_entry_by_symbol(hists, he); in hists__apply_filters()
1824 hists__filter_entry_by_socket(hists, he); in hists__apply_filters()
1825 hists__filter_entry_by_parallelism(hists, he); in hists__apply_filters()
1905 struct hist_entry *he; in hierarchy_recalc_total_periods() local
1920 he = rb_entry(node, struct hist_entry, rb_node); in hierarchy_recalc_total_periods()
1923 hists->stats.total_period += he->stat.period; in hierarchy_recalc_total_periods()
1924 hists->stats.total_latency += he->stat.latency; in hierarchy_recalc_total_periods()
1925 if (!he->filtered) { in hierarchy_recalc_total_periods()
1926 hists->stats.total_non_filtered_period += he->stat.period; in hierarchy_recalc_total_periods()
1927 hists->stats.total_non_filtered_latency += he->stat.latency; in hierarchy_recalc_total_periods()
1933 struct hist_entry *he) in hierarchy_insert_output_entry() argument
1945 if (hist_entry__sort(he, iter) > 0) in hierarchy_insert_output_entry()
1953 rb_link_node(&he->rb_node, parent, p); in hierarchy_insert_output_entry()
1954 rb_insert_color_cached(&he->rb_node, root, leftmost); in hierarchy_insert_output_entry()
1957 perf_hpp_list__for_each_sort_list(he->hpp_list, fmt) { in hierarchy_insert_output_entry()
1959 fmt->init(fmt, he); in hierarchy_insert_output_entry()
1971 struct hist_entry *he; in hists__hierarchy_output_resort() local
1977 he = rb_entry(node, struct hist_entry, rb_node_in); in hists__hierarchy_output_resort()
1980 hierarchy_insert_output_entry(root_out, he); in hists__hierarchy_output_resort()
1986 if (!he->filtered) { in hists__hierarchy_output_resort()
1988 hists__calc_col_len(hists, he); in hists__hierarchy_output_resort()
1991 if (!he->leaf) { in hists__hierarchy_output_resort()
1993 &he->hroot_in, in hists__hierarchy_output_resort()
1994 &he->hroot_out, in hists__hierarchy_output_resort()
2004 u64 total = he->stat.period; in hists__hierarchy_output_resort()
2007 total = he->stat_acc->period; in hists__hierarchy_output_resort()
2012 callchain_param.sort(&he->sorted_chain, he->callchain, in hists__hierarchy_output_resort()
2018 struct hist_entry *he, in __hists__insert_output_entry() argument
2030 u64 total = he->stat.period; in __hists__insert_output_entry()
2033 total = he->stat_acc->period; in __hists__insert_output_entry()
2037 callchain_param.sort(&he->sorted_chain, he->callchain, in __hists__insert_output_entry()
2045 if (hist_entry__sort(he, iter) > 0) in __hists__insert_output_entry()
2053 rb_link_node(&he->rb_node, parent, p); in __hists__insert_output_entry()
2054 rb_insert_color_cached(&he->rb_node, entries, leftmost); in __hists__insert_output_entry()
2059 fmt->init(fmt, he); in __hists__insert_output_entry()
2149 static bool can_goto_child(struct hist_entry *he, enum hierarchy_move_dir hmd) in can_goto_child() argument
2151 if (he->leaf || hmd == HMD_FORCE_SIBLING) in can_goto_child()
2154 if (he->unfolded || hmd == HMD_FORCE_CHILD) in can_goto_child()
2162 struct hist_entry *he = rb_entry(node, struct hist_entry, rb_node); in rb_hierarchy_last() local
2164 while (can_goto_child(he, HMD_NORMAL)) { in rb_hierarchy_last()
2165 node = rb_last(&he->hroot_out.rb_root); in rb_hierarchy_last()
2166 he = rb_entry(node, struct hist_entry, rb_node); in rb_hierarchy_last()
2173 struct hist_entry *he = rb_entry(node, struct hist_entry, rb_node); in __rb_hierarchy_next() local
2175 if (can_goto_child(he, hmd)) in __rb_hierarchy_next()
2176 node = rb_first_cached(&he->hroot_out); in __rb_hierarchy_next()
2181 he = he->parent_he; in __rb_hierarchy_next()
2182 if (he == NULL) in __rb_hierarchy_next()
2185 node = rb_next(&he->rb_node); in __rb_hierarchy_next()
2192 struct hist_entry *he = rb_entry(node, struct hist_entry, rb_node); in rb_hierarchy_prev() local
2198 he = he->parent_he; in rb_hierarchy_prev()
2199 if (he == NULL) in rb_hierarchy_prev()
2202 return &he->rb_node; in rb_hierarchy_prev()
2205 bool hist_entry__has_hierarchy_children(struct hist_entry *he, float limit) in hist_entry__has_hierarchy_children() argument
2211 if (he->leaf) in hist_entry__has_hierarchy_children()
2214 node = rb_first_cached(&he->hroot_out); in hist_entry__has_hierarchy_children()
2273 struct hist_entry *he) in hists__filter_entry_by_dso() argument
2276 (he->ms.map == NULL || !RC_CHK_EQUAL(map__dso(he->ms.map), hists->dso_filter))) { in hists__filter_entry_by_dso()
2277 he->filtered |= (1 << HIST_FILTER__DSO); in hists__filter_entry_by_dso()
2285 struct hist_entry *he) in hists__filter_entry_by_thread() argument
2288 !RC_CHK_EQUAL(he->thread, hists->thread_filter)) { in hists__filter_entry_by_thread()
2289 he->filtered |= (1 << HIST_FILTER__THREAD); in hists__filter_entry_by_thread()
2297 struct hist_entry *he) in hists__filter_entry_by_symbol() argument
2300 (!he->ms.sym || strstr(he->ms.sym->name, in hists__filter_entry_by_symbol()
2302 he->filtered |= (1 << HIST_FILTER__SYMBOL); in hists__filter_entry_by_symbol()
2310 struct hist_entry *he) in hists__filter_entry_by_socket() argument
2313 (he->socket != hists->socket_filter)) { in hists__filter_entry_by_socket()
2314 he->filtered |= (1 << HIST_FILTER__SOCKET); in hists__filter_entry_by_socket()
2322 struct hist_entry *he) in hists__filter_entry_by_parallelism() argument
2324 if (test_bit(he->parallelism, hists->parallelism_filter)) { in hists__filter_entry_by_parallelism()
2325 he->filtered |= (1 << HIST_FILTER__PARALLELISM); in hists__filter_entry_by_parallelism()
2331 typedef bool (*filter_fn_t)(struct hists *hists, struct hist_entry *he);
2353 struct hist_entry *he) in resort_filtered_entry() argument
2366 if (hist_entry__sort(he, iter) > 0) in resort_filtered_entry()
2374 rb_link_node(&he->rb_node, parent, p); in resort_filtered_entry()
2375 rb_insert_color_cached(&he->rb_node, root, leftmost); in resort_filtered_entry()
2377 if (he->leaf || he->filtered) in resort_filtered_entry()
2380 nd = rb_first_cached(&he->hroot_out); in resort_filtered_entry()
2385 rb_erase_cached(&h->rb_node, &he->hroot_out); in resort_filtered_entry()
2390 he->hroot_out = new_root; in resort_filtered_entry()
2549 struct hist_entry *he; in hists__add_dummy_entry() local
2562 he = rb_entry(parent, struct hist_entry, rb_node_in); in hists__add_dummy_entry()
2564 cmp = hist_entry__collapse(he, pair); in hists__add_dummy_entry()
2577 he = hist_entry__new(pair, true); in hists__add_dummy_entry()
2578 if (he) { in hists__add_dummy_entry()
2579 memset(&he->stat, 0, sizeof(he->stat)); in hists__add_dummy_entry()
2580 he->hists = hists; in hists__add_dummy_entry()
2582 memset(he->stat_acc, 0, sizeof(he->stat)); in hists__add_dummy_entry()
2583 rb_link_node(&he->rb_node_in, parent, p); in hists__add_dummy_entry()
2584 rb_insert_color_cached(&he->rb_node_in, root, leftmost); in hists__add_dummy_entry()
2585 hists__inc_stats(hists, he); in hists__add_dummy_entry()
2586 he->dummy = true; in hists__add_dummy_entry()
2589 return he; in hists__add_dummy_entry()
2598 struct hist_entry *he; in add_dummy_hierarchy_entry() local
2606 he = rb_entry(parent, struct hist_entry, rb_node_in); in add_dummy_hierarchy_entry()
2607 cmp = hist_entry__collapse_hierarchy(he->hpp_list, he, pair); in add_dummy_hierarchy_entry()
2619 he = hist_entry__new(pair, true); in add_dummy_hierarchy_entry()
2620 if (he) { in add_dummy_hierarchy_entry()
2621 rb_link_node(&he->rb_node_in, parent, p); in add_dummy_hierarchy_entry()
2622 rb_insert_color_cached(&he->rb_node_in, root, leftmost); in add_dummy_hierarchy_entry()
2624 he->dummy = true; in add_dummy_hierarchy_entry()
2625 he->hists = hists; in add_dummy_hierarchy_entry()
2626 memset(&he->stat, 0, sizeof(he->stat)); in add_dummy_hierarchy_entry()
2627 hists__inc_stats(hists, he); in add_dummy_hierarchy_entry()
2630 return he; in add_dummy_hierarchy_entry()
2634 struct hist_entry *he) in hists__find_entry() argument
2645 int64_t cmp = hist_entry__collapse(iter, he); in hists__find_entry()
2659 struct hist_entry *he) in hists__find_hierarchy_entry() argument
2668 cmp = hist_entry__collapse_hierarchy(he->hpp_list, iter, he); in hists__find_hierarchy_entry()
3031 struct hist_entry *he; in hists__delete_remaining_entries() local
3037 he = rb_entry(node, struct hist_entry, rb_node_in); in hists__delete_remaining_entries()
3038 hist_entry__delete(he); in hists__delete_remaining_entries()