From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Mike Galbraith" <efault@gmx.de>,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
"Paul Mackerras" <paulus@samba.org>
Subject: [PATCH 2/3] perf session: Move perf report specific hits out of perf_session__fprintf_hists
Date: Wed, 16 Dec 2009 12:27:10 -0200 [thread overview]
Message-ID: <1260973631-28035-2-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1260973631-28035-1-git-send-email-acme@infradead.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Those don't make sense for tools such as 'perf diff'.
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-report.c | 5 +++++
tools/perf/util/hist.c | 11 -----------
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 24d20e7..c4f3a08 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -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,
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 270eb8f..6e416a6 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -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)
@@ -578,14 +575,6 @@ print_entries:
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;
--
1.6.2.5
next prev parent reply other threads:[~2009-12-16 14:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 14:27 [PATCH 1/3] perf tools: Move hist entries printing routines from perf report Arnaldo Carvalho de Melo
2009-12-16 14:27 ` Arnaldo Carvalho de Melo [this message]
2009-12-16 14:27 ` [PATCH 3/3] perf report: Fix cut'n'paste error recently introduced Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1260973631-28035-2-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®