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


Groups > linux.kernel > #1331108 > unrolled thread

Re: [PATCH 13/23] perf hists: Support filtering in hierarchy mode

Started byJiri Olsa <jolsa@redhat.com>
First post2016-02-10 13:20 +0100
Last post2016-02-10 15:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 13/23] perf hists: Support filtering in hierarchy mode Jiri Olsa <jolsa@redhat.com> - 2016-02-10 13:20 +0100
    Re: [PATCH 13/23] perf hists: Support filtering in hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-02-10 15:20 +0100

#1331108 — Re: [PATCH 13/23] perf hists: Support filtering in hierarchy mode

FromJiri Olsa <jolsa@redhat.com>
Date2016-02-10 13:20 +0100
SubjectRe: [PATCH 13/23] perf hists: Support filtering in hierarchy mode
Message-ID<r0BUt-25C-9@gated-at.bofh.it>
On Fri, Feb 05, 2016 at 10:01:45PM +0900, Namhyung Kim wrote:

SNIP

> +			/* force to go to sibling in the hierarchy */
> +			saved_unfolded = h->unfolded;
> +			h->unfolded = false;
> +
> +			nd = rb_hierarchy_next(&h->rb_node);
> +			h->unfolded = saved_unfolded;
> +		}
> +	}
> +
> +	/* resort output (top-level entries only) */
> +	nd = rb_first(&hists->entries);
> +	while (nd) {
> +		struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node);
> +
> +		nd = rb_next(nd);
> +		rb_erase(&h->rb_node, &hists->entries);
> +
> +		__hists__insert_output_entry(&tmp, h, 0, false);
> +	}

what's the purpose of this resort? the only affect I see
is to recalculate callchains

thanks,
jirka

[toc] | [next] | [standalone]


#1331195

FromNamhyung Kim <namhyung@kernel.org>
Date2016-02-10 15:20 +0100
Message-ID<r0DMC-3gn-11@gated-at.bofh.it>
In reply to#1331108
On Wed, Feb 10, 2016 at 01:11:19PM +0100, Jiri Olsa wrote:
> On Fri, Feb 05, 2016 at 10:01:45PM +0900, Namhyung Kim wrote:
> 
> SNIP
> 
> > +			/* force to go to sibling in the hierarchy */
> > +			saved_unfolded = h->unfolded;
> > +			h->unfolded = false;
> > +
> > +			nd = rb_hierarchy_next(&h->rb_node);
> > +			h->unfolded = saved_unfolded;
> > +		}
> > +	}
> > +
> > +	/* resort output (top-level entries only) */
> > +	nd = rb_first(&hists->entries);
> > +	while (nd) {
> > +		struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node);
> > +
> > +		nd = rb_next(nd);
> > +		rb_erase(&h->rb_node, &hists->entries);
> > +
> > +		__hists__insert_output_entry(&tmp, h, 0, false);
> > +	}
> 
> what's the purpose of this resort? the only affect I see
> is to recalculate callchains

Filter can change parent entries' period so we need to resort after
applying a filter and this is why I pass 'false' for the
'use_callchain' param.

For example, let's say there're two top-level entries: A and B.  The A
has 40% overhead and the B has 30%.  But after applying filter the A
can have 10% and the B can have 15%.  So output should be changed to
put the B before the A.

I'll add a comment for this.

Thanks,
Namhyung

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web