- struct event_stat_id *stats;
-
- stats = rb_entry(next, struct event_stat_id, rb_node);
- perf_session__collapse_resort(&stats->hists);
- perf_session__output_resort(&stats->hists, stats->stats.total);
- if (rb_first(&session->stats_by_id) ==
- rb_last(&session->stats_by_id))
- fprintf(stdout, "# Samples: %Ld\n#\n",
- stats->stats.total);
- else
- fprintf(stdout, "# Samples: %Ld %s\n#\n",
- stats->stats.total,
- __event_name(stats->type, stats->config));
-
- perf_session__fprintf_hists(&stats->hists, NULL, false, stdout,
- stats->stats.total);
- fprintf(stdout, "\n\n");
- next = rb_next(&stats->rb_node);
+ struct hists *hists;
+
+ hists = rb_entry(next, struct hists, rb_node);
+ hists__collapse_resort(hists);
+ hists__output_resort(hists);
+ if (use_browser)
+ hists__browse(hists, help, input_name);
+ else {
+ const char *evname = NULL;
+ if (rb_first(&session->hists.entries) !=
+ rb_last(&session->hists.entries))
+ evname = __event_name(hists->type, hists->config);
+
+ hists__fprintf_nr_sample_events(hists, evname, stdout);
+
+ hists__fprintf(hists, NULL, false, stdout);
+ fprintf(stdout, "\n\n");
+ }
+
+ next = rb_next(&hists->rb_node);