Re: [PATCH 16/23] perf hists browser: Count number of hierarchy entries

2016-02-10 Thread Namhyung Kim
On Wed, Feb 10, 2016 at 01:52:08PM +0100, Jiri Olsa wrote: > On Fri, Feb 05, 2016 at 10:01:48PM +0900, Namhyung Kim wrote: > > SNIP > > > +static int hierarchy_count_rows(struct hist_browser *hb, struct hist_entry > > *he, > > + bool include_children) > > +{ > > +

Re: [PATCH 16/23] perf hists browser: Count number of hierarchy entries

2016-02-10 Thread Jiri Olsa
On Fri, Feb 05, 2016 at 10:01:48PM +0900, Namhyung Kim wrote: SNIP > +static int hierarchy_count_rows(struct hist_browser *hb, struct hist_entry > *he, > + bool include_children) > +{ > + int count = 0; > + struct rb_node *node; > + struct hist_entry

Re: [PATCH 16/23] perf hists browser: Count number of hierarchy entries

2016-02-10 Thread Namhyung Kim
On Wed, Feb 10, 2016 at 01:52:08PM +0100, Jiri Olsa wrote: > On Fri, Feb 05, 2016 at 10:01:48PM +0900, Namhyung Kim wrote: > > SNIP > > > +static int hierarchy_count_rows(struct hist_browser *hb, struct hist_entry > > *he, > > + bool include_children) > > +{ > > +

Re: [PATCH 16/23] perf hists browser: Count number of hierarchy entries

2016-02-10 Thread Jiri Olsa
On Fri, Feb 05, 2016 at 10:01:48PM +0900, Namhyung Kim wrote: SNIP > +static int hierarchy_count_rows(struct hist_browser *hb, struct hist_entry > *he, > + bool include_children) > +{ > + int count = 0; > + struct rb_node *node; > + struct hist_entry

[PATCH 16/23] perf hists browser: Count number of hierarchy entries

2016-02-05 Thread Namhyung Kim
Add nr_hierarchy_entries field to keep current number of (unfolded) hist entries. And the hist_entry->nr_rows carries number of direct children. But in the hierarchy mode, entry can have grand children and callchains. So update the number properly using hierarchy_count_rows() when toggling the

[PATCH 16/23] perf hists browser: Count number of hierarchy entries

2016-02-05 Thread Namhyung Kim
Add nr_hierarchy_entries field to keep current number of (unfolded) hist entries. And the hist_entry->nr_rows carries number of direct children. But in the hierarchy mode, entry can have grand children and callchains. So update the number properly using hierarchy_count_rows() when toggling the