lkml.org 
[lkml]   [2010]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/10] perf hists: Fixup addr snprintf width on 32 bit arches
Em Thu, Aug 05, 2010 at 06:58:07PM -0700, Joe Perches escreveu:
> On Thu, 2010-08-05 at 22:46 -0300, Arnaldo Carvalho de Melo wrote:
> > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > By using BITS_PER_LONG/4 as the width specifier.
> []
> > diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
> > index 1c61a4f..b62a553 100644
> > --- a/tools/perf/util/sort.c
> > +++ b/tools/perf/util/sort.c
> []
> > - 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, "%#016llx", self->ip);
> > + ret += repsep_snprintf(bf + ret, size - ret, "%*Lx",
> > + BITS_PER_LONG / 4, self->ip);
>
> This drops leading 0's.

Is this a problem? This removes clutter from the output, right?

- Arnaldo


\
 
 \ /
  Last update: 2010-08-06 16:33    [W:0.077 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site