Commit 71dd8945 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

perf report: Add consistent spacing rules



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

Signed-off-by: default avatarPeter 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: default avatarIngo Molnar <mingo@elte.hu>
parent 05ca061e
Loading
Loading
Loading
Loading
+19 −15
Original line number Diff line number Diff line
@@ -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;
}