aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-03-11 18:12:43 -0500
committerIngo Molnar <mingo@elte.hu>2010-03-12 04:28:37 -0500
commitdd2ee78dd8e4c6d6f1a333fd60c3dd27d1b07042 (patch)
treece68e8e1b976dd5bee0aa0fc4cb34208902ac84f /tools/perf/util
parentb4f5296f0eec2aa7061dfd8bb8c0744f095f9bd1 (diff)
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>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/hist.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index bdcfd6190b2..d43be344a88 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,
455 return ret; 455 return ret;
456} 456}
457 457
458static size_t hist_entry__fprintf(struct hist_entry *self, 458size_t hist_entry__fprintf(struct hist_entry *self,
459 struct perf_session *pair_session, 459 struct perf_session *pair_session,
460 bool show_displacement, 460 bool show_displacement,
461 long displacement, FILE *fp, 461 long displacement, FILE *fp,
462 u64 session_total) 462 u64 session_total)
463{ 463{
464 struct sort_entry *se; 464 struct sort_entry *se;
465 u64 count, total; 465 u64 count, total;
@@ -485,9 +485,9 @@ static size_t hist_entry__fprintf(struct hist_entry *self,
485 485
486 if (symbol_conf.show_nr_samples) { 486 if (symbol_conf.show_nr_samples) {
487 if (sep) 487 if (sep)
488 fprintf(fp, "%c%lld", *sep, count); 488 ret += fprintf(fp, "%c%lld", *sep, count);
489 else 489 else
490 fprintf(fp, "%11lld", count); 490 ret += fprintf(fp, "%11lld", count);
491 } 491 }
492 492
493 if (pair_session) { 493 if (pair_session) {
@@ -518,9 +518,9 @@ static size_t hist_entry__fprintf(struct hist_entry *self,
518 snprintf(bf, sizeof(bf), " "); 518 snprintf(bf, sizeof(bf), " ");
519 519
520 if (sep) 520 if (sep)
521 fprintf(fp, "%c%s", *sep, bf); 521 ret += fprintf(fp, "%c%s", *sep, bf);
522 else 522 else
523 fprintf(fp, "%6.6s", bf); 523 ret += fprintf(fp, "%6.6s", bf);
524 } 524 }
525 } 525 }
526 526
@@ -528,7 +528,7 @@ static size_t hist_entry__fprintf(struct hist_entry *self,
528 if (se->elide) 528 if (se->elide)
529 continue; 529 continue;
530 530
531 fprintf(fp, "%s", sep ?: " "); 531 ret += fprintf(fp, "%s", sep ?: " ");
532 ret += se->print(fp, self, se->width ? *se->width : 0); 532 ret += se->print(fp, self, se->width ? *se->width : 0);
533 } 533 }
534 534
@@ -544,8 +544,8 @@ static size_t hist_entry__fprintf(struct hist_entry *self,
544 left_margin -= thread__comm_len(self->thread); 544 left_margin -= thread__comm_len(self->thread);
545 } 545 }
546 546
547 hist_entry_callchain__fprintf(fp, self, session_total, 547 ret += hist_entry_callchain__fprintf(fp, self, session_total,
548 left_margin); 548 left_margin);
549 } 549 }
550 550
551 return ret; 551 return ret;