Lines Matching full:he

71 		struct hist_entry *he =  in hist_browser__get_folding()  local
74 if (he->leaf && he->unfolded) in hist_browser__get_folding()
75 unfolded_rows += he->nr_rows; in hist_browser__get_folding()
162 static char hist_entry__folded(const struct hist_entry *he) in hist_entry__folded() argument
164 return he->has_children ? tree__folded_sign(he->unfolded) : ' '; in hist_entry__folded()
273 static int hierarchy_count_rows(struct hist_browser *hb, struct hist_entry *he, in hierarchy_count_rows() argument
280 if (he->leaf) in hierarchy_count_rows()
281 return callchain__count_rows(&he->sorted_chain); in hierarchy_count_rows()
283 if (he->has_no_entry) in hierarchy_count_rows()
286 node = rb_first_cached(&he->hroot_out); in hierarchy_count_rows()
305 static bool hist_entry__toggle_fold(struct hist_entry *he) in hist_entry__toggle_fold() argument
307 if (!he) in hist_entry__toggle_fold()
310 if (!he->has_children) in hist_entry__toggle_fold()
313 he->unfolded = !he->unfolded; in hist_entry__toggle_fold()
382 static void hist_entry__init_have_children(struct hist_entry *he) in hist_entry__init_have_children() argument
384 if (he->init_have_children) in hist_entry__init_have_children()
387 if (he->leaf) { in hist_entry__init_have_children()
388 he->has_children = !RB_EMPTY_ROOT(&he->sorted_chain); in hist_entry__init_have_children()
389 callchain__init_have_children(&he->sorted_chain); in hist_entry__init_have_children()
391 he->has_children = !RB_EMPTY_ROOT(&he->hroot_out.rb_root); in hist_entry__init_have_children()
394 he->init_have_children = true; in hist_entry__init_have_children()
399 struct hist_entry *he = browser->he_selection; in hist_browser__selection_has_children() local
402 if (!he || !ms) in hist_browser__selection_has_children()
405 if (ms == &he->ms) in hist_browser__selection_has_children()
406 return he->has_children; in hist_browser__selection_has_children()
413 struct hist_entry *he = browser->he_selection; in hist_browser__selection_unfolded() local
416 if (!he || !ms) in hist_browser__selection_unfolded()
419 if (ms == &he->ms) in hist_browser__selection_unfolded()
420 return he->unfolded; in hist_browser__selection_unfolded()
427 struct hist_entry *he = browser->he_selection; in hist_browser__selection_sym_name() local
431 if (!he || !ms) in hist_browser__selection_sym_name()
434 if (ms == &he->ms) { in hist_browser__selection_sym_name()
435 hist_entry__sym_snprintf(he, bf, size, 0); in hist_browser__selection_sym_name()
445 struct hist_entry *he = browser->he_selection; in hist_browser__toggle_fold() local
450 if (!he || !ms) in hist_browser__toggle_fold()
453 if (ms == &he->ms) in hist_browser__toggle_fold()
454 has_children = hist_entry__toggle_fold(he); in hist_browser__toggle_fold()
461 hist_entry__init_have_children(he); in hist_browser__toggle_fold()
462 browser->b.nr_entries -= he->nr_rows; in hist_browser__toggle_fold()
464 if (he->leaf) in hist_browser__toggle_fold()
465 browser->nr_callchain_rows -= he->nr_rows; in hist_browser__toggle_fold()
467 browser->nr_hierarchy_entries -= he->nr_rows; in hist_browser__toggle_fold()
470 child_rows = hierarchy_count_rows(browser, he, true); in hist_browser__toggle_fold()
472 if (he->unfolded) { in hist_browser__toggle_fold()
473 if (he->leaf) in hist_browser__toggle_fold()
474 he->nr_rows = callchain__count_rows( in hist_browser__toggle_fold()
475 &he->sorted_chain); in hist_browser__toggle_fold()
477 he->nr_rows = hierarchy_count_rows(browser, he, false); in hist_browser__toggle_fold()
481 browser->b.nr_entries += child_rows - he->nr_rows; in hist_browser__toggle_fold()
483 if (!he->leaf && he->nr_rows == 0) { in hist_browser__toggle_fold()
484 he->has_no_entry = true; in hist_browser__toggle_fold()
485 he->nr_rows = 1; in hist_browser__toggle_fold()
489 browser->b.nr_entries -= child_rows - he->nr_rows; in hist_browser__toggle_fold()
491 if (he->has_no_entry) in hist_browser__toggle_fold()
492 he->has_no_entry = false; in hist_browser__toggle_fold()
494 he->nr_rows = 0; in hist_browser__toggle_fold()
497 browser->b.nr_entries += he->nr_rows; in hist_browser__toggle_fold()
499 if (he->leaf) in hist_browser__toggle_fold()
500 browser->nr_callchain_rows += he->nr_rows; in hist_browser__toggle_fold()
502 browser->nr_hierarchy_entries += he->nr_rows; in hist_browser__toggle_fold()
565 static int hierarchy_set_folding(struct hist_browser *hb, struct hist_entry *he, in hierarchy_set_folding() argument
573 for (nd = rb_first_cached(&he->hroot_out); nd; nd = rb_next(nd)) { in hierarchy_set_folding()
583 static void hist_entry__set_folding(struct hist_entry *he, in hist_entry__set_folding() argument
586 hist_entry__init_have_children(he); in hist_entry__set_folding()
587 he->unfolded = unfold ? he->has_children : false; in hist_entry__set_folding()
589 if (he->has_children) { in hist_entry__set_folding()
592 if (he->leaf) in hist_entry__set_folding()
593 n = callchain__set_folding(&he->sorted_chain, unfold); in hist_entry__set_folding()
595 n = hierarchy_set_folding(hb, he, unfold); in hist_entry__set_folding()
597 he->nr_rows = unfold ? n : 0; in hist_entry__set_folding()
599 he->nr_rows = 0; in hist_entry__set_folding()
606 struct hist_entry *he; in __hist_browser__set_folding() local
611 he = rb_entry(nd, struct hist_entry, rb_node); in __hist_browser__set_folding()
616 hist_entry__set_folding(he, browser, unfold); in __hist_browser__set_folding()
618 percent = hist_entry__get_percent_limit(he); in __hist_browser__set_folding()
619 if (he->filtered || percent < browser->min_pcnt) in __hist_browser__set_folding()
622 if (!he->depth || unfold) in __hist_browser__set_folding()
624 if (he->leaf) in __hist_browser__set_folding()
625 browser->nr_callchain_rows += he->nr_rows; in __hist_browser__set_folding()
626 else if (unfold && !hist_entry__has_hierarchy_children(he, browser->min_pcnt)) { in __hist_browser__set_folding()
628 he->has_no_entry = true; in __hist_browser__set_folding()
629 he->nr_rows = 1; in __hist_browser__set_folding()
631 he->has_no_entry = false; in __hist_browser__set_folding()
1230 static u64 __hpp_get_##_field(struct hist_entry *he) \
1232 return he->stat._field; \
1238 struct hist_entry *he) \
1240 return hpp__fmt(fmt, hpp, he, __hpp_get_##_field, " %*.2f%%", \
1245 static u64 __hpp_get_acc_##_field(struct hist_entry *he) \
1247 return he->stat_acc->_field; \
1253 struct hist_entry *he) \
1264 return hpp__fmt(fmt, hpp, he, __hpp_get_acc_##_field, \
2038 struct hist_entry *he, FILE *fp, in hist_browser__fprintf_callchain() argument
2045 hist_browser__show_callchain(browser, he, level, 0, in hist_browser__fprintf_callchain()
2052 struct hist_entry *he, FILE *fp) in hist_browser__fprintf_entry() argument
2065 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) { in hist_browser__fprintf_entry()
2066 folded_sign = hist_entry__folded(he); in hist_browser__fprintf_entry()
2071 if (perf_hpp__should_skip(fmt, he->hists)) in hist_browser__fprintf_entry()
2080 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_entry()
2081 ret = hist_entry__snprintf_alignment(he, &hpp, fmt, ret); in hist_browser__fprintf_entry()
2087 printed += hist_browser__fprintf_callchain(browser, he, fp, 1); in hist_browser__fprintf_entry()
2094 struct hist_entry *he, in hist_browser__fprintf_hierarchy_entry() argument
2108 int hierarchy_indent = (he->hists->nr_hpp_node - 2) * HIERARCHY_INDENT; in hist_browser__fprintf_hierarchy_entry()
2112 folded_sign = hist_entry__folded(he); in hist_browser__fprintf_hierarchy_entry()
2116 fmt_node = list_first_entry(&he->hists->hpp_formats, in hist_browser__fprintf_hierarchy_entry()
2125 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_hierarchy_entry()
2132 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_browser__fprintf_hierarchy_entry()
2136 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_hierarchy_entry()
2143 if (he->leaf && folded_sign == '-') { in hist_browser__fprintf_hierarchy_entry()
2144 printed += hist_browser__fprintf_callchain(browser, he, fp, in hist_browser__fprintf_hierarchy_entry()
2145 he->depth + 1); in hist_browser__fprintf_hierarchy_entry()
2431 struct hist_entry *he; in do_annotate() local
2448 he = hist_browser__selected_entry(browser); in do_annotate()
2453 if ((err == 'q' || err == CTRL('c')) && he->branch_info) in do_annotate()
2512 struct hist_entry *he = browser->he_selection; in do_annotate_type() local
2514 hist_entry__annotate_data_tui(he, act->evsel, browser->hbt); in do_annotate_type()
2522 struct hist_entry *he) in add_annotate_type_opt() argument
2524 if (he == NULL || he->mem_type == NULL || he->mem_type->histograms == NULL) in add_annotate_type_opt()
2527 if (asprintf(optstr, "Annotate type %s", he->mem_type->self.type_name) < 0) in add_annotate_type_opt()
2739 struct hist_entry *he; in do_res_sample_script() local
2741 he = hist_browser__selected_entry(browser); in do_res_sample_script()
2742 res_sample_browse(he->res_samples, he->num_res, act->evsel, act->rstype); in do_res_sample_script()
2780 struct hist_entry *he; in add_script_opt() local
2784 he = hist_browser__selected_entry(browser); in add_script_opt()
2791 j += timestamp__scnprintf_usec(he->time, tstr + j, in add_script_opt()
2794 timestamp__scnprintf_usec(he->time + symbol_conf.time_quantum, in add_script_opt()
2798 act->time = he->time; in add_script_opt()
2929 struct hist_entry *he; in hist_browser__update_percent_limit() local
2937 he = rb_entry(nd, struct hist_entry, rb_node); in hist_browser__update_percent_limit()
2939 if (he->has_no_entry) { in hist_browser__update_percent_limit()
2940 he->has_no_entry = false; in hist_browser__update_percent_limit()
2941 he->nr_rows = 0; in hist_browser__update_percent_limit()
2944 if (!he->leaf || !hist_entry__has_callchains(he) || !symbol_conf.use_callchain) in hist_browser__update_percent_limit()
2948 total = he->stat.period; in hist_browser__update_percent_limit()
2951 total = he->stat_acc->period; in hist_browser__update_percent_limit()
2956 callchain_param.sort(&he->sorted_chain, he->callchain, in hist_browser__update_percent_limit()
2963 he->init_have_children = false; in hist_browser__update_percent_limit()
2964 hist_entry__set_folding(he, hb, false); in hist_browser__update_percent_limit()