diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-03-11 20:12:43 -0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-12 10:28:37 +0100 |
commit | dd2ee78dd8e4c6d6f1a333fd60c3dd27d1b07042 (patch) | |
tree | ce68e8e1b976dd5bee0aa0fc4cb34208902ac84f | |
parent | b4f5296f0eec2aa7061dfd8bb8c0744f095f9bd1 (diff) | |
download | op-kernel-dev-dd2ee78dd8e4c6d6f1a333fd60c3dd27d1b07042.zip op-kernel-dev-dd2ee78dd8e4c6d6f1a333fd60c3dd27d1b07042.tar.gz |
perf tools: Add missing bytes printed in hist_entry__fprintf
We need those to properly size the browser widht in the newt
TUI.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
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>
LKML-Reference: <1268349164-5822-4-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | tools/perf/util/hist.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index bdcfd61..d43be34 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -455,11 +455,11 @@ static size_t hist_entry_callchain__fprintf(FILE *fp, struct hist_entry *self, return ret; } -static size_t hist_entry__fprintf(struct hist_entry *self, - struct perf_session *pair_session, - bool show_displacement, - long displacement, FILE *fp, - u64 session_total) +size_t hist_entry__fprintf(struct hist_entry *self, + struct perf_session *pair_session, + bool show_displacement, + long displacement, FILE *fp, + u64 session_total) { struct sort_entry *se; u64 count, total; @@ -485,9 +485,9 @@ static size_t hist_entry__fprintf(struct hist_entry *self, if (symbol_conf.show_nr_samples) { if (sep) - fprintf(fp, "%c%lld", *sep, count); + ret += fprintf(fp, "%c%lld", *sep, count); else - fprintf(fp, "%11lld", count); + ret += fprintf(fp, "%11lld", count); } if (pair_session) { @@ -518,9 +518,9 @@ static size_t hist_entry__fprintf(struct hist_entry *self, snprintf(bf, sizeof(bf), " "); if (sep) - fprintf(fp, "%c%s", *sep, bf); + ret += fprintf(fp, "%c%s", *sep, bf); else - fprintf(fp, "%6.6s", bf); + ret += fprintf(fp, "%6.6s", bf); } } @@ -528,7 +528,7 @@ static size_t hist_entry__fprintf(struct hist_entry *self, if (se->elide) continue; - fprintf(fp, "%s", sep ?: " "); + ret += fprintf(fp, "%s", sep ?: " "); ret += se->print(fp, self, se->width ? *se->width : 0); } @@ -544,8 +544,8 @@ static size_t hist_entry__fprintf(struct hist_entry *self, left_margin -= thread__comm_len(self->thread); } - hist_entry_callchain__fprintf(fp, self, session_total, - left_margin); + ret += hist_entry_callchain__fprintf(fp, self, session_total, + left_margin); } return ret; |