Re: [PATCH 7/7] perf hists/tui: Count callchain rows separately

From: Jiri Olsa
Date: Wed Apr 23 2014 - 11:07:58 EST


On Wed, Apr 23, 2014 at 11:57:33PM +0900, Namhyung Kim wrote:
> 2014-04-23 (ì), 16:29 +0200, Jiri Olsa:
> > On Wed, Apr 23, 2014 at 04:00:08PM +0900, Namhyung Kim wrote:
> > > When TUI hist browser expands/collapses callchains it accounted number
> > > of callchain nodes into total entries to show. However this code
> > > ignores filtering so that it can make the cursor go to out of screen.
> >
> > SNIP
> >
> > hi,
> > I needed following patch, otherwise following test case would segfault
> >
> > - record with -g
> > - report - unfold one symbol
> > - search for nonsense
> >
> > the reason is that after unfolding the symbol the nr_callchain_rows
> > will get some number, which will cause the hist_browser__nr_entries
> > function return (entries != 0) actually (entries == nr_callchain_rows)
> > even if there's no entry passing the filter
>
> Argh, right.. Thanks for spotting this. I guess other filters (thread,
> dso) have same problem.
>
> >
> > fixing that by unfolding everything after the filter and reseting
> > the nr_callchain_rows number
>
> Hmm.. I think hists__remove_entry_filter() already folds them so how
> about just setting ->nr_callchain_rows to 0 in hist_browser__reset()
> instead?

ok, sounds good

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/