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:	Thu, 24 Jul 2014 17:58:14 +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 3/6] perf tools: Save column length in perf_hpp_fmt

On Fri, Jul 25, 2014 at 12:46:25AM +0900, Namhyung Kim wrote:
> On Thu, Jul 24, 2014 at 9:10 PM, Jiri Olsa <jolsa@...hat.com> wrote:
> > On Wed, Jul 09, 2014 at 02:28:11PM +0900, Namhyung Kim wrote:
> >> Save column length in the hpp format and pass it to print functions.
> >> This is a preparation for users to control column width in the output.
> >
> > SNIP
> >
> >> +
> >> +void perf_hpp__reset_width(struct perf_hpp_fmt *fmt, struct hists *hists)
> >> +{
> >> +     int idx;
> >> +
> >> +     if (perf_hpp__is_sort_entry(fmt))
> >> +             return perf_hpp__reset_sort_width(fmt, hists);
> >> +
> >> +     for (idx = 0; idx < PERF_HPP__MAX_INDEX; idx++) {
> >> +             if (fmt == &perf_hpp__format[idx])
> >> +                     break;
> >> +     }
> >> +
> >> +     if (idx == PERF_HPP__MAX_INDEX)
> >> +             return;
> >> +
> >> +     switch (idx) {
> >> +     case PERF_HPP__OVERHEAD:
> >> +     case PERF_HPP__OVERHEAD_SYS:
> >> +     case PERF_HPP__OVERHEAD_US:
> >> +     case PERF_HPP__OVERHEAD_ACC:
> >> +             fmt->len = 8;
> >> +             break;
> >> +
> >> +     case PERF_HPP__OVERHEAD_GUEST_SYS:
> >> +     case PERF_HPP__OVERHEAD_GUEST_US:
> >> +             fmt->len = 9;
> >> +             break;
> >
> > just curious.. why is it 9 for guest %, while we use 8 for host?
> > I understand that was the current state
> 
> It's the strlen of header - "guest sys". :)

argh.. I did not think of header, just value ;-)

thanks,
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ