• Home
  • Raw
  • Download

Lines Matching refs:he

67 		struct hist_entry *he =  in hist_browser__get_folding()  local
70 if (he->leaf && he->unfolded) in hist_browser__get_folding()
71 unfolded_rows += he->nr_rows; in hist_browser__get_folding()
158 static char hist_entry__folded(const struct hist_entry *he) in hist_entry__folded() argument
160 return he->has_children ? tree__folded_sign(he->unfolded) : ' '; in hist_entry__folded()
269 static int hierarchy_count_rows(struct hist_browser *hb, struct hist_entry *he, in hierarchy_count_rows() argument
276 if (he->leaf) in hierarchy_count_rows()
277 return callchain__count_rows(&he->sorted_chain); in hierarchy_count_rows()
279 if (he->has_no_entry) in hierarchy_count_rows()
282 node = rb_first_cached(&he->hroot_out); in hierarchy_count_rows()
301 static bool hist_entry__toggle_fold(struct hist_entry *he) in hist_entry__toggle_fold() argument
303 if (!he) in hist_entry__toggle_fold()
306 if (!he->has_children) in hist_entry__toggle_fold()
309 he->unfolded = !he->unfolded; in hist_entry__toggle_fold()
378 static void hist_entry__init_have_children(struct hist_entry *he) in hist_entry__init_have_children() argument
380 if (he->init_have_children) in hist_entry__init_have_children()
383 if (he->leaf) { in hist_entry__init_have_children()
384 he->has_children = !RB_EMPTY_ROOT(&he->sorted_chain); in hist_entry__init_have_children()
385 callchain__init_have_children(&he->sorted_chain); in hist_entry__init_have_children()
387 he->has_children = !RB_EMPTY_ROOT(&he->hroot_out.rb_root); in hist_entry__init_have_children()
390 he->init_have_children = true; in hist_entry__init_have_children()
395 struct hist_entry *he = browser->he_selection; in hist_browser__toggle_fold() local
400 if (!he || !ms) in hist_browser__toggle_fold()
403 if (ms == &he->ms) in hist_browser__toggle_fold()
404 has_children = hist_entry__toggle_fold(he); in hist_browser__toggle_fold()
411 hist_entry__init_have_children(he); in hist_browser__toggle_fold()
412 browser->b.nr_entries -= he->nr_rows; in hist_browser__toggle_fold()
414 if (he->leaf) in hist_browser__toggle_fold()
415 browser->nr_callchain_rows -= he->nr_rows; in hist_browser__toggle_fold()
417 browser->nr_hierarchy_entries -= he->nr_rows; in hist_browser__toggle_fold()
420 child_rows = hierarchy_count_rows(browser, he, true); in hist_browser__toggle_fold()
422 if (he->unfolded) { in hist_browser__toggle_fold()
423 if (he->leaf) in hist_browser__toggle_fold()
424 he->nr_rows = callchain__count_rows( in hist_browser__toggle_fold()
425 &he->sorted_chain); in hist_browser__toggle_fold()
427 he->nr_rows = hierarchy_count_rows(browser, he, false); in hist_browser__toggle_fold()
431 browser->b.nr_entries += child_rows - he->nr_rows; in hist_browser__toggle_fold()
433 if (!he->leaf && he->nr_rows == 0) { in hist_browser__toggle_fold()
434 he->has_no_entry = true; in hist_browser__toggle_fold()
435 he->nr_rows = 1; in hist_browser__toggle_fold()
439 browser->b.nr_entries -= child_rows - he->nr_rows; in hist_browser__toggle_fold()
441 if (he->has_no_entry) in hist_browser__toggle_fold()
442 he->has_no_entry = false; in hist_browser__toggle_fold()
444 he->nr_rows = 0; in hist_browser__toggle_fold()
447 browser->b.nr_entries += he->nr_rows; in hist_browser__toggle_fold()
449 if (he->leaf) in hist_browser__toggle_fold()
450 browser->nr_callchain_rows += he->nr_rows; in hist_browser__toggle_fold()
452 browser->nr_hierarchy_entries += he->nr_rows; in hist_browser__toggle_fold()
515 static int hierarchy_set_folding(struct hist_browser *hb, struct hist_entry *he, in hierarchy_set_folding() argument
523 for (nd = rb_first_cached(&he->hroot_out); nd; nd = rb_next(nd)) { in hierarchy_set_folding()
533 static void __hist_entry__set_folding(struct hist_entry *he, in __hist_entry__set_folding() argument
536 hist_entry__init_have_children(he); in __hist_entry__set_folding()
537 he->unfolded = unfold ? he->has_children : false; in __hist_entry__set_folding()
539 if (he->has_children) { in __hist_entry__set_folding()
542 if (he->leaf) in __hist_entry__set_folding()
543 n = callchain__set_folding(&he->sorted_chain, unfold); in __hist_entry__set_folding()
545 n = hierarchy_set_folding(hb, he, unfold); in __hist_entry__set_folding()
547 he->nr_rows = unfold ? n : 0; in __hist_entry__set_folding()
549 he->nr_rows = 0; in __hist_entry__set_folding()
552 static void hist_entry__set_folding(struct hist_entry *he, in hist_entry__set_folding() argument
557 percent = hist_entry__get_percent_limit(he); in hist_entry__set_folding()
558 if (he->filtered || percent < browser->min_pcnt) in hist_entry__set_folding()
561 __hist_entry__set_folding(he, browser, unfold); in hist_entry__set_folding()
563 if (!he->depth || unfold) in hist_entry__set_folding()
565 if (he->leaf) in hist_entry__set_folding()
566 browser->nr_callchain_rows += he->nr_rows; in hist_entry__set_folding()
567 else if (unfold && !hist_entry__has_hierarchy_children(he, browser->min_pcnt)) { in hist_entry__set_folding()
569 he->has_no_entry = true; in hist_entry__set_folding()
570 he->nr_rows = 1; in hist_entry__set_folding()
572 he->has_no_entry = false; in hist_entry__set_folding()
579 struct hist_entry *he; in __hist_browser__set_folding() local
583 he = rb_entry(nd, struct hist_entry, rb_node); in __hist_browser__set_folding()
588 hist_entry__set_folding(he, browser, unfold); in __hist_browser__set_folding()
1178 static u64 __hpp_get_##_field(struct hist_entry *he) \
1180 return he->stat._field; \
1186 struct hist_entry *he) \
1188 return hpp__fmt(fmt, hpp, he, __hpp_get_##_field, " %*.2f%%", \
1193 static u64 __hpp_get_acc_##_field(struct hist_entry *he) \
1195 return he->stat_acc->_field; \
1201 struct hist_entry *he) \
1212 return hpp__fmt(fmt, hpp, he, __hpp_get_acc_##_field, \
1982 struct hist_entry *he, FILE *fp, in hist_browser__fprintf_callchain() argument
1989 hist_browser__show_callchain(browser, he, level, 0, in hist_browser__fprintf_callchain()
1996 struct hist_entry *he, FILE *fp) in hist_browser__fprintf_entry() argument
2009 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) { in hist_browser__fprintf_entry()
2010 folded_sign = hist_entry__folded(he); in hist_browser__fprintf_entry()
2015 if (perf_hpp__should_skip(fmt, he->hists)) in hist_browser__fprintf_entry()
2024 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_entry()
2025 ret = hist_entry__snprintf_alignment(he, &hpp, fmt, ret); in hist_browser__fprintf_entry()
2031 printed += hist_browser__fprintf_callchain(browser, he, fp, 1); in hist_browser__fprintf_entry()
2038 struct hist_entry *he, in hist_browser__fprintf_hierarchy_entry() argument
2052 int hierarchy_indent = (he->hists->nr_hpp_node - 2) * HIERARCHY_INDENT; in hist_browser__fprintf_hierarchy_entry()
2056 folded_sign = hist_entry__folded(he); in hist_browser__fprintf_hierarchy_entry()
2060 fmt_node = list_first_entry(&he->hists->hpp_formats, in hist_browser__fprintf_hierarchy_entry()
2069 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_hierarchy_entry()
2076 perf_hpp_list__for_each_format(he->hpp_list, fmt) { in hist_browser__fprintf_hierarchy_entry()
2080 ret = fmt->entry(fmt, &hpp, he); in hist_browser__fprintf_hierarchy_entry()
2087 if (he->leaf && folded_sign == '-') { in hist_browser__fprintf_hierarchy_entry()
2088 printed += hist_browser__fprintf_callchain(browser, he, fp, in hist_browser__fprintf_hierarchy_entry()
2089 he->depth + 1); in hist_browser__fprintf_hierarchy_entry()
2372 struct hist_entry *he; in do_annotate() local
2386 he = hist_browser__selected_entry(browser); in do_annotate()
2391 if ((err == 'q' || err == CTRL('c')) && he->branch_info) in do_annotate()
2594 struct hist_entry *he; in do_res_sample_script() local
2596 he = hist_browser__selected_entry(browser); in do_res_sample_script()
2597 res_sample_browse(he->res_samples, he->num_res, act->evsel, act->rstype); in do_res_sample_script()
2635 struct hist_entry *he; in add_script_opt() local
2639 he = hist_browser__selected_entry(browser); in add_script_opt()
2646 j += timestamp__scnprintf_usec(he->time, tstr + j, in add_script_opt()
2649 timestamp__scnprintf_usec(he->time + symbol_conf.time_quantum, in add_script_opt()
2653 act->time = he->time; in add_script_opt()
2784 struct hist_entry *he; in hist_browser__update_percent_limit() local
2792 he = rb_entry(nd, struct hist_entry, rb_node); in hist_browser__update_percent_limit()
2794 if (he->has_no_entry) { in hist_browser__update_percent_limit()
2795 he->has_no_entry = false; in hist_browser__update_percent_limit()
2796 he->nr_rows = 0; in hist_browser__update_percent_limit()
2799 if (!he->leaf || !hist_entry__has_callchains(he) || !symbol_conf.use_callchain) in hist_browser__update_percent_limit()
2803 total = he->stat.period; in hist_browser__update_percent_limit()
2806 total = he->stat_acc->period; in hist_browser__update_percent_limit()
2811 callchain_param.sort(&he->sorted_chain, he->callchain, in hist_browser__update_percent_limit()
2818 he->init_have_children = false; in hist_browser__update_percent_limit()
2819 hist_entry__set_folding(he, hb, false); in hist_browser__update_percent_limit()