static int hist_browser__fprintf_hierarchy_entry(struct hist_browser *browser,
struct hist_entry *he,
- FILE *fp, int level,
- int nr_sort_keys)
+ FILE *fp, int level)
{
char s[8192];
int printed = 0;
.size = sizeof(s),
};
struct perf_hpp_fmt *fmt;
+ struct perf_hpp_list_node *fmt_node;
bool first = true;
int ret;
- int hierarchy_indent = nr_sort_keys * HIERARCHY_INDENT;
+ int hierarchy_indent = (he->hists->nr_hpp_node - 2) * HIERARCHY_INDENT;
printed = fprintf(fp, "%*s", level * HIERARCHY_INDENT, "");
folded_sign = hist_entry__folded(he);
printed += fprintf(fp, "%c", folded_sign);
- hists__for_each_format(he->hists, fmt) {
- if (perf_hpp__should_skip(fmt, he->hists))
- continue;
-
- if (perf_hpp__is_sort_entry(fmt) ||
- perf_hpp__is_dynamic_entry(fmt))
- break;
-
+ /* the first hpp_list_node is for overhead columns */
+ fmt_node = list_first_entry(&he->hists->hpp_formats,
+ struct perf_hpp_list_node, list);
+ perf_hpp_list__for_each_format(&fmt_node->hpp, fmt) {
if (!first) {
ret = scnprintf(hpp.buf, hpp.size, " ");
advance_hpp(&hpp, ret);
struct rb_node *nd = hists__filter_entries(rb_first(browser->b.entries),
browser->min_pcnt);
int printed = 0;
- int nr_sort = browser->hists->nr_sort_keys;
while (nd) {
struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node);
if (symbol_conf.report_hierarchy) {
printed += hist_browser__fprintf_hierarchy_entry(browser,
h, fp,
- h->depth,
- nr_sort);
+ h->depth);
} else {
printed += hist_browser__fprintf_entry(browser, h, fp);
}