summaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-08-06 02:17:22 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-08-06 02:38:01 +0400
commitfb89941ea761f53201959cc217a2c73f6fe13855 (patch)
treeb126fdaa92f7bff05b16a5dbba10a95e11faedba /tools/perf
parent903cce6eb9117550755de9bf92f3b48367b7dfe0 (diff)
downloadlinux-fb89941ea761f53201959cc217a2c73f6fe13855.tar.xz
perf hists: Fixup addr snprintf width on 32 bit arches
By using BITS_PER_LONG/4 as the width specifier. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/sort.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 1c61a4f4aa8a..b62a553cc67d 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -196,7 +196,8 @@ static int hist_entry__sym_snprintf(struct hist_entry *self, char *bf,
if (verbose) {
char o = self->ms.map ? dso__symtab_origin(self->ms.map->dso) : '!';
- ret += repsep_snprintf(bf, size, "%#018llx %c ", self->ip, o);
+ ret += repsep_snprintf(bf, size, "%*Lx %c ",
+ BITS_PER_LONG / 4, self->ip, o);
}
ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", self->level);
@@ -204,7 +205,8 @@ static int hist_entry__sym_snprintf(struct hist_entry *self, char *bf,
ret += repsep_snprintf(bf + ret, size - ret, "%s",
self->ms.sym->name);
else
- ret += repsep_snprintf(bf + ret, size - ret, "%#016llx", self->ip);
+ ret += repsep_snprintf(bf + ret, size - ret, "%*Lx",
+ BITS_PER_LONG / 4, self->ip);
return ret;
}