Skip to contentSkip to conversation

perf report: Simplify symbol output

tip:perfcounters/core tip-bot for Peter Zijlstra 1 participant 1 message Jun 4, 2009 Documentation

lore
Share & tools
lore
#0 lore raw
Commit-ID:  95ed6fd06e52bf850cd17524f0b36ed14300c10d
Gitweb:     http://git.kernel.org/tip/95ed6fd06e52bf850cd17524f0b36ed14300c10d
Author:     Peter Zijlstra <[email protected]>
AuthorDate: Thu, 4 Jun 2009 15:00:45 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 4 Jun 2009 14:04:50 +0200

perf report: Simplify symbol output

The DSO can be printed already - no need to repeat it in the symbol field.

Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Marcelo Tosatti <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>

LKML-Reference: <new-submission>

---
 Documentation/perf_counter/builtin-report.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)
Documentation/perf_counter/builtin-report.c +6 -11
index ff6f657..56c664d 100644
@@ -382,7 +382,7 @@ sort__comm_print(FILE *fp, struct hist_entry *self)
 }
 
 static struct sort_entry sort_comm = {
-	.header 	= "          Command",
+	.header		= "          Command",
 	.cmp		= sort__comm_cmp,
 	.collapse	= sort__comm_collapse,
 	.print		= sort__comm_print,
@@ -414,11 +414,11 @@ sort__dso_print(FILE *fp, struct hist_entry *self)
 	if (self->dso)
 		return fprintf(fp, "  %-25s", self->dso->name);
 
-	return fprintf(fp, "  %016llx", (__u64)self->ip);
+	return fprintf(fp, "  %016llx         ", (__u64)self->ip);
 }
 
 static struct sort_entry sort_dso = {
-	.header = " Shared Object          ",
+	.header = " Shared Object            ",
 	.cmp	= sort__dso_cmp,
 	.print	= sort__dso_print,
 };
@@ -447,21 +447,16 @@ sort__sym_print(FILE *fp, struct hist_entry *self)
 	if (verbose)
 		ret += fprintf(fp, "  %#018llx", (__u64)self->ip);
 
-	if (self->dso)
-		ret += fprintf(fp, "  %s: ", self->dso->name);
-	else
-		ret += fprintf(fp, "  %#016llx: ", (__u64)self->ip);
-
 	if (self->sym)
-		ret += fprintf(fp, "%s", self->sym->name);
+		ret += fprintf(fp, "  %s", self->sym->name);
 	else
-		ret += fprintf(fp, "%#016llx", (__u64)self->ip);
+		ret += fprintf(fp, "  %#016llx", (__u64)self->ip);
 
 	return ret;
 }
 
 static struct sort_entry sort_sym = {
-	.header = " Shared Object: Symbol",
+	.header = " Symbol",
 	.cmp	= sort__sym_cmp,
 	.print	= sort__sym_print,
 };