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:	Fri, 4 Mar 2016 08:53:57 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
CC:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Jiri Olsa <jolsa@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Andi Kleen <andi@...stfloor.org>,
	Stephane Eranian <eranian@...gle.com>,
	Wang Nan <wangnan0@...wei.com>
Subject: Re: [PATCH 2/8] perf tools: Introduce perf_hpp__setup_hists_formats()

On Thu, Mar 03, 2016 at 02:40:33PM +0100, Jiri Olsa wrote:
> On Thu, Mar 03, 2016 at 01:12:02AM +0900, Namhyung Kim wrote:
> > The perf_hpp__setup_hists_formats() is to build hists-specific output
> > formats (and sort keys).  Currently it's only used in order to build the
> > output format in a hierarchy with same sort keys, but it could be used
> > with different sort keys in non-hierarchy mode later.
> > 
> > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> > ---
> >  tools/perf/ui/hist.c   | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++
> >  tools/perf/util/hist.c | 12 +++++++++
> >  tools/perf/util/hist.h | 10 ++++++++
> >  tools/perf/util/sort.c | 29 ++++++++++++++++++++++
> >  4 files changed, 117 insertions(+)
> > 
> > diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
> > index 7c0585c146e1..ded564936701 100644
> > --- a/tools/perf/ui/hist.c
> > +++ b/tools/perf/ui/hist.c
> > @@ -5,6 +5,7 @@
> >  #include "../util/util.h"
> >  #include "../util/sort.h"
> >  #include "../util/evsel.h"
> > +#include "../util/evlist.h"
> >  
> >  /* hist period print (hpp) functions */
> >  
> > @@ -715,3 +716,68 @@ void perf_hpp__set_user_width(const char *width_list_str)
> >  			break;
> >  	}
> >  }
> > +
> > +static int add_hierarchy_fmt(struct hists *hists, struct perf_hpp_fmt *fmt)
> > +{
> > +	struct perf_hpp_list_node *node = NULL;
> > +	struct perf_hpp_fmt *fmt_copy;
> > +	bool found = false;
> > +
> > +	list_for_each_entry(node, &hists->hpp_formats, list) {
> > +		struct perf_hpp_fmt *pos;
> > +
> > +		pos = list_first_entry(&node->hpp.fields, struct perf_hpp_fmt, list);
> 
> the struct perf_hpp_list_node could hold 'level' as well,
> so you wouldn't need to query first fmt

Will change.

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ