Skip to content

Commit

Permalink
perf session: Move perf report specific hits out of perf_session__fpr…
Browse files Browse the repository at this point in the history
…intf_hists

Those don't make sense for tools such as 'perf diff'.

Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Frédéric Weisbecker <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
acmel authored and Ingo Molnar committed Dec 16, 2009
1 parent 4ecf84d commit 3e6055a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
5 changes: 5 additions & 0 deletions tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ static int __cmd_report(void)

perf_session__collapse_resort(session);
perf_session__output_resort(session, session->events_stats.total);
fprintf(stdout, "# Samples: %ld\n#\n", session->events_stats.total);
perf_session__fprintf_hists(session, stdout);
if (sort_order == default_sort_order &&
parent_pattern == default_parent_pattern)
fprintf(stdout, "#\n# (For a higher level overview, try: perf report --sort comm,dso)\n#\n");

if (show_threads) {
bool raw_printing_style = !strcmp(pretty_printing_style, "raw");
perf_read_values_display(stdout, &show_threads_values,
Expand Down
11 changes: 0 additions & 11 deletions tools/perf/util/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,6 @@ size_t perf_session__fprintf_hists(struct perf_session *self, FILE *fp)

init_rem_hits();

fprintf(fp, "# Samples: %ld\n", self->events_stats.total);
fprintf(fp, "#\n");

fprintf(fp, "# Overhead");
if (symbol_conf.show_nr_samples) {
if (symbol_conf.field_sep)
Expand Down Expand Up @@ -578,14 +575,6 @@ size_t perf_session__fprintf_hists(struct perf_session *self, FILE *fp)
ret += hist_entry__fprintf(fp, pos, self);
}

if (sort_order == default_sort_order &&
parent_pattern == default_parent_pattern) {
fprintf(fp, "#\n");
fprintf(fp, "# (For a higher level overview, try: perf report --sort comm,dso)\n");
fprintf(fp, "#\n");
}
fprintf(fp, "\n");

free(rem_sq_bracket);

return ret;
Expand Down

0 comments on commit 3e6055a

Please sign in to comment.