• Home
  • Raw
  • Download

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()
417 struct hist_entry *he = browser->he_selection; in hist_browser__selection_unfolded() local
420 if (!he || !ms) in hist_browser__selection_unfolded()
423 if (ms == &he->ms) in hist_browser__selection_unfolded()
424 return he->unfolded; in hist_browser__selection_unfolded()
431 struct hist_entry *he = browser->he_selection; in hist_browser__selection_sym_name() local
435 if (!he || !ms) in hist_browser__selection_sym_name()
438 if (ms == &he->ms) { in hist_browser__selection_sym_name()
439 hist_entry__sym_snprintf(he, bf, size, 0); in hist_browser__selection_sym_name()
449 struct hist_entry *he = browser->he_selection; in hist_browser__toggle_fold() local
454 if (!he || !ms) in hist_browser__toggle_fold()
457 if (ms == &he->ms) in hist_browser__toggle_fold()
458 has_children = hist_entry__toggle_fold(he); in hist_browser__toggle_fold()
465 hist_entry__init_have_children(he); in hist_browser__toggle_fold()
466 browser->b.nr_entries -= he->nr_rows; in hist_browser__toggle_fold()
468 if (he->leaf) in hist_browser__toggle_fold()
469 browser->nr_callchain_rows -= he->nr_rows; in hist_browser__toggle_fold()
471 browser->nr_hierarchy_entries -= he->nr_rows; in hist_browser__toggle_fold()
474 child_rows = hierarchy_count_rows(browser, he, true); in hist_browser__toggle_fold()
476 if (he->unfolded) { in hist_browser__toggle_fold()
477 if (he->leaf) in hist_browser__toggle_fold()
478 he->nr_rows = callchain__count_rows( in hist_browser__toggle_fold()
479 &he->sorted_chain); in hist_browser__toggle_fold()
481 he->nr_rows = hierarchy_count_rows(browser, he, false); in hist_browser__toggle_fold()
485 browser->b.nr_entries += child_rows - he->nr_rows; in hist_browser__toggle_fold()
487 if (!he->leaf && he->nr_rows == 0) { in hist_browser__toggle_fold()
488 he->has_no_entry = true; in hist_browser__toggle_fold()
489 he->nr_rows = 1; in hist_browser__toggle_fold()
493 browser->b.nr_entries -= child_rows - he->nr_rows; in hist_browser__toggle_fold()
495 if (he->has_no_entry) in hist_browser__toggle_fold()
496 he->has_no_entry = false; in hist_browser__toggle_fold()
498 he->nr_rows = 0; in hist_browser__toggle_fold()
501 browser->b.nr_entries += he->nr_rows; in hist_browser__toggle_fold()
503 if (he->leaf) in hist_browser__toggle_fold()
504 browser->nr_callchain_rows += he->nr_rows; in hist_browser__toggle_fold()
506 browser->nr_hierarchy_entries += he->nr_rows; in hist_browser__toggle_fold()
569 static int hierarchy_set_folding(struct hist_browser *hb, struct hist_entry *he, in hierarchy_set_folding() argument
577 for (nd = rb_first_cached(&he->hroot_out); nd; nd = rb_next(nd)) { in hierarchy_set_folding()
587 static void __hist_entry__set_folding(struct hist_entry *he, in __hist_entry__set_folding() argument
590 hist_entry__init_have_children(he); in __hist_entry__set_folding()
591 he->unfolded = unfold ? he->has_children : false; in __hist_entry__set_folding()
593 if (he->has_children) { in __hist_entry__set_folding()
596 if (he->leaf) in __hist_entry__set_folding()
597 n = callchain__set_folding(&he->sorted_chain, unfold); in __hist_entry__set_folding()
599 n = hierarchy_set_folding(hb, he, unfold); in __hist_entry__set_folding()
601 he->nr_rows = unfold ? n : 0; in __hist_entry__set_folding()
603 he->nr_rows = 0; in __hist_entry__set_folding()
606 static void hist_entry__set_folding(struct hist_entry *he, in hist_entry__set_folding() argument
611 percent = hist_entry__get_percent_limit(he); in hist_entry__set_folding()
612 if (he->filtered || percent < browser->min_pcnt) in hist_entry__set_folding()
615 __hist_entry__set_folding(he, browser, unfold); in hist_entry__set_folding()
617 if (!he->depth || unfold) in hist_entry__set_folding()
619 if (he->leaf) in hist_entry__set_folding()
620 browser->nr_callchain_rows += he->nr_rows; in hist_entry__set_folding()
621 else if (unfold && !hist_entry__has_hierarchy_children(he, browser->min_pcnt)) { in hist_entry__set_folding()
623 he->has_no_entry = true; in hist_entry__set_folding()
624 he->nr_rows = 1; in hist_entry__set_folding()
626 he->has_no_entry = false; in hist_entry__set_folding()
633 struct hist_entry *he; in __hist_browser__set_folding() local
637 he = rb_entry(nd, struct hist_entry, rb_node); in __hist_browser__set_folding()
642 hist_entry__set_folding(he, browser, unfold); in __hist_browser__set_folding()
1238 static u64 __hpp_get_##_field(struct hist_entry *he) \
1240 return he->stat._field; \
1246 struct hist_entry *he) \
1248 return hpp__fmt(fmt, hpp, he, __hpp_get_##_field, " %*.2f%%", \
1253 static u64 __hpp_get_acc_##_field(struct hist_entry *he) \
1255 return he->stat_acc->_field; \
1261 struct hist_entry *he) \
1272 return hpp__fmt(fmt, hpp, he, __hpp_get_acc_##_field, \
2046 struct hist_entry *he, FILE *fp, in hist_browser__fprintf_callchain() argument
2053 hist_browser__show_callchain(browser, he, level, 0, in hist_browser__fprintf_callchain()
2060 struct hist_entry *he, FILE *fp) in hist_browser__fprintf_entry() argument
2073 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) { in hist_browser__fprintf_entry()
2074 folded_sign = hist_entry__folded(he); in hist_browser__fprintf_entry()
2079 if (perf_hpp__should_skip(fmt, he->hists)) in hist_browser__fprintf_entry()
2088 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_entry()
2089 ret = hist_entry__snprintf_alignment(he, &hpp, fmt, ret); in hist_browser__fprintf_entry()
2095 printed += hist_browser__fprintf_callchain(browser, he, fp, 1); in hist_browser__fprintf_entry()
2102 struct hist_entry *he, in hist_browser__fprintf_hierarchy_entry() argument
2116 int hierarchy_indent = (he->hists->nr_hpp_node - 2) * HIERARCHY_INDENT; in hist_browser__fprintf_hierarchy_entry()
2120 folded_sign = hist_entry__folded(he); in hist_browser__fprintf_hierarchy_entry()
2124 fmt_node = list_first_entry(&he->hists->hpp_formats, in hist_browser__fprintf_hierarchy_entry()
2133 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_hierarchy_entry()
2140 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_browser__fprintf_hierarchy_entry()
2144 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_hierarchy_entry()
2151 if (he->leaf && folded_sign == '-') { in hist_browser__fprintf_hierarchy_entry()
2152 printed += hist_browser__fprintf_callchain(browser, he, fp, in hist_browser__fprintf_hierarchy_entry()
2153 he->depth + 1); in hist_browser__fprintf_hierarchy_entry()
2441 struct hist_entry *he; in do_annotate() local
2459 he = hist_browser__selected_entry(browser); in do_annotate()
2464 if ((err == 'q' || err == CTRL('c')) && he->branch_info) in do_annotate()
2720 struct hist_entry *he; in do_res_sample_script() local
2722 he = hist_browser__selected_entry(browser); in do_res_sample_script()
2723 res_sample_browse(he->res_samples, he->num_res, act->evsel, act->rstype); in do_res_sample_script()
2761 struct hist_entry *he; in add_script_opt() local
2765 he = hist_browser__selected_entry(browser); in add_script_opt()
2772 j += timestamp__scnprintf_usec(he->time, tstr + j, in add_script_opt()
2775 timestamp__scnprintf_usec(he->time + symbol_conf.time_quantum, in add_script_opt()
2779 act->time = he->time; in add_script_opt()
2910 struct hist_entry *he; in hist_browser__update_percent_limit() local
2918 he = rb_entry(nd, struct hist_entry, rb_node); in hist_browser__update_percent_limit()
2920 if (he->has_no_entry) { in hist_browser__update_percent_limit()
2921 he->has_no_entry = false; in hist_browser__update_percent_limit()
2922 he->nr_rows = 0; in hist_browser__update_percent_limit()
2925 if (!he->leaf || !hist_entry__has_callchains(he) || !symbol_conf.use_callchain) in hist_browser__update_percent_limit()
2929 total = he->stat.period; in hist_browser__update_percent_limit()
2932 total = he->stat_acc->period; in hist_browser__update_percent_limit()
2937 callchain_param.sort(&he->sorted_chain, he->callchain, in hist_browser__update_percent_limit()
2944 he->init_have_children = false; in hist_browser__update_percent_limit()
2945 hist_entry__set_folding(he, hb, false); in hist_browser__update_percent_limit()