Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1351581

Re: [PATCH v2 3/8] perf tools: Use own hpp_list for hierarchy mode

From Namhyung Kim <namhyung@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 3/8] perf tools: Use own hpp_list for hierarchy mode
Date 2016-03-07 13:50 +0100
Message-ID <ra2LM-2Ud-3@gated-at.bofh.it> (permalink)
References <r8ZwB-8vJ-11@gated-at.bofh.it> <r8ZwB-8vJ-13@gated-at.bofh.it> <r9oY1-1yY-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Jiri,

On Sat, Mar 05, 2016 at 07:17:22PM +0100, Jiri Olsa wrote:
> On Fri, Mar 04, 2016 at 11:59:37PM +0900, Namhyung Kim wrote:
> 
> SNIP
> 
> > @@ -1150,20 +1159,29 @@ static int hists__hierarchy_insert_entry(struct hists *hists,
> >  					 struct hist_entry *he)
> >  {
> >  	struct perf_hpp_fmt *fmt;
> > +	struct perf_hpp_list_node *node;
> >  	struct hist_entry *new_he = NULL;
> >  	struct hist_entry *parent = NULL;
> >  	int depth = 0;
> >  	int ret = 0;
> >  
> > -	hists__for_each_sort_list(hists, fmt) {
> > -		if (!perf_hpp__is_sort_entry(fmt) &&
> > -		    !perf_hpp__is_dynamic_entry(fmt))
> > -			continue;
> > -		if (perf_hpp__should_skip(fmt, hists))
> > +	list_for_each_entry(node, &hists->hpp_formats, list) {
> > +		bool skip = false;
> > +
> > +		perf_hpp_list__for_each_sort_list(&node->hpp, fmt) {
> > +			if (!perf_hpp__is_sort_entry(fmt) &&
> > +			    !perf_hpp__is_dynamic_entry(fmt))
> > +				skip = true;
> > +			if (perf_hpp__should_skip(fmt, hists))
> > +				skip = true;
> > +			if (skip)
> > +				break;
> 
> could we add skip bool into node and initialize it gradually in add_hierarchy_fmt?

Right.

We can simply skip the node if all fmts it contains should be skipped.

Thanks,
Namhyung

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 3/8] perf tools: Use own hpp_list for hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-03-04 16:10 +0100
  Re: [PATCH v2 3/8] perf tools: Use own hpp_list for hierarchy mode Jiri Olsa <jolsa@redhat.com> - 2016-03-05 19:20 +0100
    Re: [PATCH v2 3/8] perf tools: Use own hpp_list for hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-03-07 13:50 +0100

csiph-web