Lines Matching refs:he
70 struct hist_entry *he = in hist_browser__get_folding() local
73 if (he->leaf && he->unfolded) in hist_browser__get_folding()
74 unfolded_rows += he->nr_rows; in hist_browser__get_folding()
161 static char hist_entry__folded(const struct hist_entry *he) in hist_entry__folded() argument
163 return he->has_children ? tree__folded_sign(he->unfolded) : ' '; in hist_entry__folded()
272 static int hierarchy_count_rows(struct hist_browser *hb, struct hist_entry *he, in hierarchy_count_rows() argument
279 if (he->leaf) in hierarchy_count_rows()
280 return callchain__count_rows(&he->sorted_chain); in hierarchy_count_rows()
282 if (he->has_no_entry) in hierarchy_count_rows()
285 node = rb_first_cached(&he->hroot_out); in hierarchy_count_rows()
304 static bool hist_entry__toggle_fold(struct hist_entry *he) in hist_entry__toggle_fold() argument
306 if (!he) in hist_entry__toggle_fold()
309 if (!he->has_children) in hist_entry__toggle_fold()
312 he->unfolded = !he->unfolded; in hist_entry__toggle_fold()
381 static void hist_entry__init_have_children(struct hist_entry *he) in hist_entry__init_have_children() argument
383 if (he->init_have_children) in hist_entry__init_have_children()
386 if (he->leaf) { in hist_entry__init_have_children()
387 he->has_children = !RB_EMPTY_ROOT(&he->sorted_chain); in hist_entry__init_have_children()
388 callchain__init_have_children(&he->sorted_chain); in hist_entry__init_have_children()
390 he->has_children = !RB_EMPTY_ROOT(&he->hroot_out.rb_root); in hist_entry__init_have_children()
393 he->init_have_children = true; in hist_entry__init_have_children()
398 struct hist_entry *he = browser->he_selection; in hist_browser__selection_has_children() local
401 if (!he || !ms) in hist_browser__selection_has_children()
404 if (ms == &he->ms) in hist_browser__selection_has_children()
405 return he->has_children; in hist_browser__selection_has_children()
412 struct hist_entry *he = browser->he_selection; in hist_browser__selection_unfolded() local
415 if (!he || !ms) in hist_browser__selection_unfolded()
418 if (ms == &he->ms) in hist_browser__selection_unfolded()
419 return he->unfolded; in hist_browser__selection_unfolded()
426 struct hist_entry *he = browser->he_selection; in hist_browser__selection_sym_name() local
430 if (!he || !ms) in hist_browser__selection_sym_name()
433 if (ms == &he->ms) { in hist_browser__selection_sym_name()
434 hist_entry__sym_snprintf(he, bf, size, 0); in hist_browser__selection_sym_name()
444 struct hist_entry *he = browser->he_selection; in hist_browser__toggle_fold() local
449 if (!he || !ms) in hist_browser__toggle_fold()
452 if (ms == &he->ms) in hist_browser__toggle_fold()
453 has_children = hist_entry__toggle_fold(he); in hist_browser__toggle_fold()
460 hist_entry__init_have_children(he); in hist_browser__toggle_fold()
461 browser->b.nr_entries -= he->nr_rows; in hist_browser__toggle_fold()
463 if (he->leaf) in hist_browser__toggle_fold()
464 browser->nr_callchain_rows -= he->nr_rows; in hist_browser__toggle_fold()
466 browser->nr_hierarchy_entries -= he->nr_rows; in hist_browser__toggle_fold()
469 child_rows = hierarchy_count_rows(browser, he, true); in hist_browser__toggle_fold()
471 if (he->unfolded) { in hist_browser__toggle_fold()
472 if (he->leaf) in hist_browser__toggle_fold()
473 he->nr_rows = callchain__count_rows( in hist_browser__toggle_fold()
474 &he->sorted_chain); in hist_browser__toggle_fold()
476 he->nr_rows = hierarchy_count_rows(browser, he, false); in hist_browser__toggle_fold()
480 browser->b.nr_entries += child_rows - he->nr_rows; in hist_browser__toggle_fold()
482 if (!he->leaf && he->nr_rows == 0) { in hist_browser__toggle_fold()
483 he->has_no_entry = true; in hist_browser__toggle_fold()
484 he->nr_rows = 1; in hist_browser__toggle_fold()
488 browser->b.nr_entries -= child_rows - he->nr_rows; in hist_browser__toggle_fold()
490 if (he->has_no_entry) in hist_browser__toggle_fold()
491 he->has_no_entry = false; in hist_browser__toggle_fold()
493 he->nr_rows = 0; in hist_browser__toggle_fold()
496 browser->b.nr_entries += he->nr_rows; in hist_browser__toggle_fold()
498 if (he->leaf) in hist_browser__toggle_fold()
499 browser->nr_callchain_rows += he->nr_rows; in hist_browser__toggle_fold()
501 browser->nr_hierarchy_entries += he->nr_rows; in hist_browser__toggle_fold()
564 static int hierarchy_set_folding(struct hist_browser *hb, struct hist_entry *he, in hierarchy_set_folding() argument
572 for (nd = rb_first_cached(&he->hroot_out); nd; nd = rb_next(nd)) { in hierarchy_set_folding()
582 static void hist_entry__set_folding(struct hist_entry *he, in hist_entry__set_folding() argument
585 hist_entry__init_have_children(he); in hist_entry__set_folding()
586 he->unfolded = unfold ? he->has_children : false; in hist_entry__set_folding()
588 if (he->has_children) { in hist_entry__set_folding()
591 if (he->leaf) in hist_entry__set_folding()
592 n = callchain__set_folding(&he->sorted_chain, unfold); in hist_entry__set_folding()
594 n = hierarchy_set_folding(hb, he, unfold); in hist_entry__set_folding()
596 he->nr_rows = unfold ? n : 0; in hist_entry__set_folding()
598 he->nr_rows = 0; in hist_entry__set_folding()
605 struct hist_entry *he; in __hist_browser__set_folding() local
610 he = rb_entry(nd, struct hist_entry, rb_node); in __hist_browser__set_folding()
615 hist_entry__set_folding(he, browser, unfold); in __hist_browser__set_folding()
617 percent = hist_entry__get_percent_limit(he); in __hist_browser__set_folding()
618 if (he->filtered || percent < browser->min_pcnt) in __hist_browser__set_folding()
621 if (!he->depth || unfold) in __hist_browser__set_folding()
623 if (he->leaf) in __hist_browser__set_folding()
624 browser->nr_callchain_rows += he->nr_rows; in __hist_browser__set_folding()
625 else if (unfold && !hist_entry__has_hierarchy_children(he, browser->min_pcnt)) { in __hist_browser__set_folding()
627 he->has_no_entry = true; in __hist_browser__set_folding()
628 he->nr_rows = 1; in __hist_browser__set_folding()
630 he->has_no_entry = false; in __hist_browser__set_folding()
1229 static u64 __hpp_get_##_field(struct hist_entry *he) \
1231 return he->stat._field; \
1237 struct hist_entry *he) \
1239 return hpp__fmt(fmt, hpp, he, __hpp_get_##_field, " %*.2f%%", \
1244 static u64 __hpp_get_acc_##_field(struct hist_entry *he) \
1246 return he->stat_acc->_field; \
1252 struct hist_entry *he) \
1263 return hpp__fmt(fmt, hpp, he, __hpp_get_acc_##_field, \
2037 struct hist_entry *he, FILE *fp, in hist_browser__fprintf_callchain() argument
2044 hist_browser__show_callchain(browser, he, level, 0, in hist_browser__fprintf_callchain()
2051 struct hist_entry *he, FILE *fp) in hist_browser__fprintf_entry() argument
2064 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) { in hist_browser__fprintf_entry()
2065 folded_sign = hist_entry__folded(he); in hist_browser__fprintf_entry()
2070 if (perf_hpp__should_skip(fmt, he->hists)) in hist_browser__fprintf_entry()
2079 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_entry()
2080 ret = hist_entry__snprintf_alignment(he, &hpp, fmt, ret); in hist_browser__fprintf_entry()
2086 printed += hist_browser__fprintf_callchain(browser, he, fp, 1); in hist_browser__fprintf_entry()
2093 struct hist_entry *he, in hist_browser__fprintf_hierarchy_entry() argument
2107 int hierarchy_indent = (he->hists->nr_hpp_node - 2) * HIERARCHY_INDENT; in hist_browser__fprintf_hierarchy_entry()
2111 folded_sign = hist_entry__folded(he); in hist_browser__fprintf_hierarchy_entry()
2115 fmt_node = list_first_entry(&he->hists->hpp_formats, in hist_browser__fprintf_hierarchy_entry()
2124 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_hierarchy_entry()
2131 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_browser__fprintf_hierarchy_entry()
2135 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_hierarchy_entry()
2142 if (he->leaf && folded_sign == '-') { in hist_browser__fprintf_hierarchy_entry()
2143 printed += hist_browser__fprintf_callchain(browser, he, fp, in hist_browser__fprintf_hierarchy_entry()
2144 he->depth + 1); in hist_browser__fprintf_hierarchy_entry()
2432 struct hist_entry *he; in do_annotate() local
2450 he = hist_browser__selected_entry(browser); in do_annotate()
2455 if ((err == 'q' || err == CTRL('c')) && he->branch_info) in do_annotate()
2711 struct hist_entry *he; in do_res_sample_script() local
2713 he = hist_browser__selected_entry(browser); in do_res_sample_script()
2714 res_sample_browse(he->res_samples, he->num_res, act->evsel, act->rstype); in do_res_sample_script()
2752 struct hist_entry *he; in add_script_opt() local
2756 he = hist_browser__selected_entry(browser); in add_script_opt()
2763 j += timestamp__scnprintf_usec(he->time, tstr + j, in add_script_opt()
2766 timestamp__scnprintf_usec(he->time + symbol_conf.time_quantum, in add_script_opt()
2770 act->time = he->time; in add_script_opt()
2901 struct hist_entry *he; in hist_browser__update_percent_limit() local
2909 he = rb_entry(nd, struct hist_entry, rb_node); in hist_browser__update_percent_limit()
2911 if (he->has_no_entry) { in hist_browser__update_percent_limit()
2912 he->has_no_entry = false; in hist_browser__update_percent_limit()
2913 he->nr_rows = 0; in hist_browser__update_percent_limit()
2916 if (!he->leaf || !hist_entry__has_callchains(he) || !symbol_conf.use_callchain) in hist_browser__update_percent_limit()
2920 total = he->stat.period; in hist_browser__update_percent_limit()
2923 total = he->stat_acc->period; in hist_browser__update_percent_limit()
2928 callchain_param.sort(&he->sorted_chain, he->callchain, in hist_browser__update_percent_limit()
2935 he->init_have_children = false; in hist_browser__update_percent_limit()
2936 hist_entry__set_folding(he, hb, false); in hist_browser__update_percent_limit()