提交 dd2ee78d 编写于 作者: A Arnaldo Carvalho de Melo 提交者: Ingo Molnar

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: NArnaldo 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: NIngo Molnar <mingo@elte.hu>
上级 b4f5296f
...@@ -455,7 +455,7 @@ static size_t hist_entry_callchain__fprintf(FILE *fp, struct hist_entry *self, ...@@ -455,7 +455,7 @@ static size_t hist_entry_callchain__fprintf(FILE *fp, struct hist_entry *self,
return ret; return ret;
} }
static size_t hist_entry__fprintf(struct hist_entry *self, size_t hist_entry__fprintf(struct hist_entry *self,
struct perf_session *pair_session, struct perf_session *pair_session,
bool show_displacement, bool show_displacement,
long displacement, FILE *fp, long displacement, FILE *fp,
...@@ -485,9 +485,9 @@ static size_t hist_entry__fprintf(struct hist_entry *self, ...@@ -485,9 +485,9 @@ static size_t hist_entry__fprintf(struct hist_entry *self,
if (symbol_conf.show_nr_samples) { if (symbol_conf.show_nr_samples) {
if (sep) if (sep)
fprintf(fp, "%c%lld", *sep, count); ret += fprintf(fp, "%c%lld", *sep, count);
else else
fprintf(fp, "%11lld", count); ret += fprintf(fp, "%11lld", count);
} }
if (pair_session) { if (pair_session) {
...@@ -518,9 +518,9 @@ static size_t hist_entry__fprintf(struct hist_entry *self, ...@@ -518,9 +518,9 @@ static size_t hist_entry__fprintf(struct hist_entry *self,
snprintf(bf, sizeof(bf), " "); snprintf(bf, sizeof(bf), " ");
if (sep) if (sep)
fprintf(fp, "%c%s", *sep, bf); ret += fprintf(fp, "%c%s", *sep, bf);
else 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, ...@@ -528,7 +528,7 @@ static size_t hist_entry__fprintf(struct hist_entry *self,
if (se->elide) if (se->elide)
continue; continue;
fprintf(fp, "%s", sep ?: " "); ret += fprintf(fp, "%s", sep ?: " ");
ret += se->print(fp, self, se->width ? *se->width : 0); ret += se->print(fp, self, se->width ? *se->width : 0);
} }
...@@ -544,7 +544,7 @@ static size_t hist_entry__fprintf(struct hist_entry *self, ...@@ -544,7 +544,7 @@ static size_t hist_entry__fprintf(struct hist_entry *self,
left_margin -= thread__comm_len(self->thread); left_margin -= thread__comm_len(self->thread);
} }
hist_entry_callchain__fprintf(fp, self, session_total, ret += hist_entry_callchain__fprintf(fp, self, session_total,
left_margin); left_margin);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册