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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 903cce6e
...@@ -196,7 +196,8 @@ static int hist_entry__sym_snprintf(struct hist_entry *self, char *bf, ...@@ -196,7 +196,8 @@ static int hist_entry__sym_snprintf(struct hist_entry *self, char *bf,
if (verbose) { if (verbose) {
char o = self->ms.map ? dso__symtab_origin(self->ms.map->dso) : '!'; 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); 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, ...@@ -204,7 +205,8 @@ static int hist_entry__sym_snprintf(struct hist_entry *self, char *bf,
ret += repsep_snprintf(bf + ret, size - ret, "%s", ret += repsep_snprintf(bf + ret, size - ret, "%s",
self->ms.sym->name); self->ms.sym->name);
else 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; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment