perf report: Add consistent spacing rules

Make the sort header and the print function have the same column width.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Peter Zijlstra 2009-06-04 15:16:56 +02:00 committed by Ingo Molnar
parent 05ca061eb9
commit 71dd8945d8

View file

@ -553,8 +553,10 @@ hist_entry__fprintf(FILE *fp, struct hist_entry *self, uint64_t total_samples)
} else
ret = fprintf(fp, "%12d ", self->count);
list_for_each_entry(se, &hist_entry__sort_list, list)
list_for_each_entry(se, &hist_entry__sort_list, list) {
fprintf(fp, " ");
ret += se->print(fp, self);
}
ret += fprintf(fp, "\n");
@ -721,6 +723,7 @@ static size_t output__fprintf(FILE *fp, uint64_t total_samples)
struct rb_node *nd;
size_t ret = 0;
fprintf(fp, "\n");
fprintf(fp, "#\n");
fprintf(fp, "# (%Ld profiler events)\n", (__u64)total_samples);
fprintf(fp, "#\n");
@ -735,7 +738,7 @@ static size_t output__fprintf(FILE *fp, uint64_t total_samples)
int i;
fprintf(fp, " ");
for (i = 0; i < strlen(se->header)-1; i++)
for (i = 0; i < strlen(se->header); i++)
fprintf(fp, ".");
}
fprintf(fp, "\n");
@ -752,6 +755,7 @@ static size_t output__fprintf(FILE *fp, uint64_t total_samples)
fprintf(fp, "# (For more details, try: perf report --sort comm,dso,symbol)\n");
fprintf(fp, "#\n");
}
fprintf(fp, "\n");
return ret;
}