Re: [PATCH 2/3] perf hists: Link hist entries before inserting to an output tree

2012-12-05 Thread Namhyung Kim
On Wed, 5 Dec 2012 20:15:47 +0100, Jiri Olsa wrote: > On Wed, Dec 05, 2012 at 08:06:46PM +0100, Jiri Olsa wrote: >> On Wed, Dec 05, 2012 at 03:56:42PM +0900, Namhyung Kim wrote: >> > From: Namhyung Kim >> > @@ -481,6 +459,11 @@ static void hists__process(struct hists *old, struct >> > hists *new)

Re: [PATCH 2/3] perf hists: Link hist entries before inserting to an output tree

2012-12-05 Thread Jiri Olsa
On Wed, Dec 05, 2012 at 08:06:46PM +0100, Jiri Olsa wrote: > On Wed, Dec 05, 2012 at 03:56:42PM +0900, Namhyung Kim wrote: > > From: Namhyung Kim > > > > SNIP > > > - struct rb_node *next = rb_first(&hists->entries); > > + struct rb_root *root; > > + struct rb_node *next; > > + > > + if

Re: [PATCH 2/3] perf hists: Link hist entries before inserting to an output tree

2012-12-05 Thread Arnaldo Carvalho de Melo
Em Wed, Dec 05, 2012 at 08:06:46PM +0100, Jiri Olsa escreveu: > On Wed, Dec 05, 2012 at 03:56:42PM +0900, Namhyung Kim wrote: > > From: Namhyung Kim > > @@ -481,6 +459,11 @@ static void hists__process(struct hists *old, struct > > hists *new) > > else > > hists__link(new, old); >

Re: [PATCH 2/3] perf hists: Link hist entries before inserting to an output tree

2012-12-05 Thread Jiri Olsa
On Wed, Dec 05, 2012 at 03:56:42PM +0900, Namhyung Kim wrote: > From: Namhyung Kim > SNIP > - struct rb_node *next = rb_first(&hists->entries); > + struct rb_root *root; > + struct rb_node *next; > + > + if (sort__need_collapse) > + root = &hists->entries_collapsed;

[PATCH 2/3] perf hists: Link hist entries before inserting to an output tree

2012-12-04 Thread Namhyung Kim
From: Namhyung Kim For matching and/or linking hist entries, they need to be sorted by given sort keys. However current hists__match/link did this on the output trees, so that the entries in the output tree need to be resort before doing it. This looks not so good since we have trees for collec

[PATCH 2/3] perf hists: Link hist entries before inserting to an output tree

2012-12-03 Thread Namhyung Kim
From: Namhyung Kim For matching and/or linking hist entries, they need to be sorted by given sort keys. However current hists__match/link did this on the output trees, so that the entries in the output tree need to be resort before doing it. This looks not so good since we have trees for collec