Skip to content

Commit

Permalink
perf report: Simplify symbol output
Browse files Browse the repository at this point in the history
The DSO can be printed already - no need to repeat it in the
symbol field.

Signed-off-by: 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>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 4, 2009
1 parent af794b9 commit 95ed6fd
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions Documentation/perf_counter/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
};
Expand Down Expand Up @@ -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,
};
Expand Down

0 comments on commit 95ed6fd

Please sign in to comment.