lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Sep 2016 16:49:34 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Jiri Olsa <jolsa@...nel.org>, lkml <linux-kernel@...r.kernel.org>,
        Don Zickus <dzickus@...hat.com>, Joe Mario <jmario@...hat.com>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Namhyung Kim <namhyung@...nel.org>,
        David Ahern <dsahern@...il.com>,
        Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH 61/61] perf tools: Fix width computation for srcline sort
 entry

On Mon, Sep 19, 2016 at 11:33:19AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Sep 19, 2016 at 03:10:10PM +0200, Jiri Olsa escreveu:
> > Adding header size to width computation for srcline sort entry,
> > because it's possible to get empty data with ':0' which set width
> > of 2 which is lower than width needed to display column header.
> 
> Thanks, cherry-picked, looking at the larger patchset.

oops, it's on this side of the patchset because it needs
sort_srcline to be global, which is done within the patchset..

I can separate that for v4 if it's needed ;-)

thanks,
jirka

> 
> - Arnaldo
>  
> > Link: http://lkml.kernel.org/n/tip-twbp391v8v9f5idp584hlfov@git.kernel.org
> > Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> > ---
> >  tools/perf/util/hist.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
> > index 020efa9d3d74..e1be4132054d 100644
> > --- a/tools/perf/util/hist.c
> > +++ b/tools/perf/util/hist.c
> > @@ -177,8 +177,10 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h)
> >  	hists__new_col_len(hists, HISTC_LOCAL_WEIGHT, 12);
> >  	hists__new_col_len(hists, HISTC_GLOBAL_WEIGHT, 12);
> >  
> > -	if (h->srcline)
> > -		hists__new_col_len(hists, HISTC_SRCLINE, strlen(h->srcline));
> > +	if (h->srcline) {
> > +		len = MAX(strlen(h->srcline), strlen(sort_srcline.se_header));
> > +		hists__new_col_len(hists, HISTC_SRCLINE, len);
> > +	}
> >  
> >  	if (h->srcfile)
> >  		hists__new_col_len(hists, HISTC_SRCFILE, strlen(h->srcfile));
> > -- 
> > 2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ