Skip to content

Commit

Permalink
perf hists: Fixup addr snprintf width on 32 bit arches
Browse files Browse the repository at this point in the history
By using BITS_PER_LONG/4 as the width specifier.

Cc: Frederic Weisbecker <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
acmel committed Aug 5, 2010
1 parent 903cce6 commit fb89941
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/perf/util/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,17 @@ 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);
if (self->ms.sym)
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;
}
Expand Down

0 comments on commit fb89941

Please sign in to comment.