Lines Matching refs:he

70 		struct hist_entry *he =
73 if (he->leaf && he->unfolded)
74 unfolded_rows += he->nr_rows;
161 static char hist_entry__folded(const struct hist_entry *he)
163 return he->has_children ? tree__folded_sign(he->unfolded) : ' ';
272 static int hierarchy_count_rows(struct hist_browser *hb, struct hist_entry *he,
279 if (he->leaf)
280 return callchain__count_rows(&he->sorted_chain);
282 if (he->has_no_entry)
285 node = rb_first_cached(&he->hroot_out);
304 static bool hist_entry__toggle_fold(struct hist_entry *he)
306 if (!he)
309 if (!he->has_children)
312 he->unfolded = !he->unfolded;
381 static void hist_entry__init_have_children(struct hist_entry *he)
383 if (he->init_have_children)
386 if (he->leaf) {
387 he->has_children = !RB_EMPTY_ROOT(&he->sorted_chain);
388 callchain__init_have_children(&he->sorted_chain);
390 he->has_children = !RB_EMPTY_ROOT(&he->hroot_out.rb_root);
393 he->init_have_children = true;
398 struct hist_entry *he = browser->he_selection;
401 if (!he || !ms)
404 if (ms == &he->ms)
405 return he->has_children;
412 struct hist_entry *he = browser->he_selection;
415 if (!he || !ms)
418 if (ms == &he->ms)
419 return he->unfolded;
426 struct hist_entry *he = browser->he_selection;
430 if (!he || !ms)
433 if (ms == &he->ms) {
434 hist_entry__sym_snprintf(he, bf, size, 0);
444 struct hist_entry *he = browser->he_selection;
449 if (!he || !ms)
452 if (ms == &he->ms)
453 has_children = hist_entry__toggle_fold(he);
460 hist_entry__init_have_children(he);
461 browser->b.nr_entries -= he->nr_rows;
463 if (he->leaf)
464 browser->nr_callchain_rows -= he->nr_rows;
466 browser->nr_hierarchy_entries -= he->nr_rows;
469 child_rows = hierarchy_count_rows(browser, he, true);
471 if (he->unfolded) {
472 if (he->leaf)
473 he->nr_rows = callchain__count_rows(
474 &he->sorted_chain);
476 he->nr_rows = hierarchy_count_rows(browser, he, false);
480 browser->b.nr_entries += child_rows - he->nr_rows;
482 if (!he->leaf && he->nr_rows == 0) {
483 he->has_no_entry = true;
484 he->nr_rows = 1;
488 browser->b.nr_entries -= child_rows - he->nr_rows;
490 if (he->has_no_entry)
491 he->has_no_entry = false;
493 he->nr_rows = 0;
496 browser->b.nr_entries += he->nr_rows;
498 if (he->leaf)
499 browser->nr_callchain_rows += he->nr_rows;
501 browser->nr_hierarchy_entries += he->nr_rows;
564 static int hierarchy_set_folding(struct hist_browser *hb, struct hist_entry *he,
572 for (nd = rb_first_cached(&he->hroot_out); nd; nd = rb_next(nd)) {
582 static void hist_entry__set_folding(struct hist_entry *he,
585 hist_entry__init_have_children(he);
586 he->unfolded = unfold ? he->has_children : false;
588 if (he->has_children) {
591 if (he->leaf)
592 n = callchain__set_folding(&he->sorted_chain, unfold);
594 n = hierarchy_set_folding(hb, he, unfold);
596 he->nr_rows = unfold ? n : 0;
598 he->nr_rows = 0;
605 struct hist_entry *he;
610 he = rb_entry(nd, struct hist_entry, rb_node);
615 hist_entry__set_folding(he, browser, unfold);
617 percent = hist_entry__get_percent_limit(he);
618 if (he->filtered || percent < browser->min_pcnt)
621 if (!he->depth || unfold)
623 if (he->leaf)
624 browser->nr_callchain_rows += he->nr_rows;
625 else if (unfold && !hist_entry__has_hierarchy_children(he, browser->min_pcnt)) {
627 he->has_no_entry = true;
628 he->nr_rows = 1;
630 he->has_no_entry = false;
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,
2044 hist_browser__show_callchain(browser, he, level, 0,
2051 struct hist_entry *he, FILE *fp)
2064 if (hist_entry__has_callchains(he) && symbol_conf.use_callchain) {
2065 folded_sign = hist_entry__folded(he);
2070 if (perf_hpp__should_skip(fmt, he->hists))
2079 ret = fmt->entry(fmt, &hpp, he);
2080 ret = hist_entry__snprintf_alignment(he, &hpp, fmt, ret);
2086 printed += hist_browser__fprintf_callchain(browser, he, fp, 1);
2093 struct hist_entry *he,
2107 int hierarchy_indent = (he->hists->nr_hpp_node - 2) * HIERARCHY_INDENT;
2111 folded_sign = hist_entry__folded(he);
2115 fmt_node = list_first_entry(&he->hists->hpp_formats,
2124 ret = fmt->entry(fmt, &hpp, he);
2131 perf_hpp_list__for_each_format(he->hpp_list, fmt) {
2135 ret = fmt->entry(fmt, &hpp, he);
2142 if (he->leaf && folded_sign == '-') {
2143 printed += hist_browser__fprintf_callchain(browser, he, fp,
2144 he->depth + 1);
2430 struct hist_entry *he;
2447 he = hist_browser__selected_entry(browser);
2452 if ((err == 'q' || err == CTRL('c')) && he->branch_info)
2712 struct hist_entry *he;
2714 he = hist_browser__selected_entry(browser);
2715 res_sample_browse(he->res_samples, he->num_res, act->evsel, act->rstype);
2753 struct hist_entry *he;
2757 he = hist_browser__selected_entry(browser);
2764 j += timestamp__scnprintf_usec(he->time, tstr + j,
2767 timestamp__scnprintf_usec(he->time + symbol_conf.time_quantum,
2771 act->time = he->time;
2902 struct hist_entry *he;
2910 he = rb_entry(nd, struct hist_entry, rb_node);
2912 if (he->has_no_entry) {
2913 he->has_no_entry = false;
2914 he->nr_rows = 0;
2917 if (!he->leaf || !hist_entry__has_callchains(he) || !symbol_conf.use_callchain)
2921 total = he->stat.period;
2924 total = he->stat_acc->period;
2929 callchain_param.sort(&he->sorted_chain, he->callchain,
2936 he->init_have_children = false;
2937 hist_entry__set_folding(he, hb, false);