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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 28 Jul 2014 13:17:33 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/7] perf report: Honor column width setting

On Mon, Jul 28, 2014 at 09:43:37AM +0900, Namhyung Kim wrote:
> On Fri, 25 Jul 2014 13:13:02 +0200, Jiri Olsa wrote:
> > On Fri, Jul 25, 2014 at 10:18:55AM +0900, Namhyung Kim wrote:
> >> Set column width and do not change it if user gives -w/--column-widths
> >> option.  It'll truncate longer symbols than the width if exists.
> >> 
> >> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> >> ---
> >
> > SNIP
> >
> >>  
> >>  __HPP_COLOR_PERCENT_FN(overhead, period)
> >> @@ -797,8 +798,11 @@ static int hist_browser__show_entry(struct hist_browser *browser,
> >>  			if (fmt->color) {
> >>  				width -= fmt->color(fmt, &hpp, entry);
> >>  			} else {
> >> -				width -= fmt->entry(fmt, &hpp, entry);
> >> +				int ret = fmt->entry(fmt, &hpp, entry);
> >> +				s[ret] = '\0';
> >>  				slsmg_printf("%s", s);
> >
> > from quick check it seems like all entry callback functions
> > use some sort of snprint which should already handle the string
> > length properly.. if not, we should fix that instead, no?
> 
> It was 'symbol' sort entry (_hist_entry__sym_snprintf) which has several
> snprint calls in it.  So I changed here rather than adding complexity
> the print function.  I can change it if you want. ;)

it'd seem more consistent to me.. Arnaldo? ;-)

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists