Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1338907
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 10/25] perf hists: Resort hist entries with hierarchy |
| Date | 2016-02-21 19:00 +0100 |
| Message-ID | <r4GsA-16v-49@gated-at.bofh.it> (permalink) |
| References | <r2ODT-vy-3@gated-at.bofh.it> <r2ODU-vy-27@gated-at.bofh.it> <r4oYF-523-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Feb 21, 2016 at 12:19:18AM +0100, Jiri Olsa wrote:
> On Tue, Feb 16, 2016 at 11:08:28PM +0900, Namhyung Kim wrote:
>
> SNIP
>
> > @@ -1349,6 +1427,17 @@ static void output_resort(struct hists *hists, struct ui_progress *prog,
> >
> > min_callchain_hits = callchain_total * (callchain_param.min_percent / 100);
> >
> > + hists__reset_stats(hists);
> > + hists__reset_col_len(hists);
> > +
> > + if (symbol_conf.report_hierarchy) {
> > + return hists__hierarchy_output_resort(hists, prog,
> > + &hists->entries_collapsed,
> > + &hists->entries,
> > + min_callchain_hits,
> > + use_callchain);
> > + }
> > +
> > if (sort__need_collapse)
> > root = &hists->entries_collapsed;
> > else
> > @@ -1357,9 +1446,6 @@ static void output_resort(struct hists *hists, struct ui_progress *prog,
> > next = rb_first(root);
> > hists->entries = RB_ROOT;
>
> above line could be moved together with those 2 below
> and you can then remove *root_out = RB_ROOT; line in
> hists__hierarchy_output_resort
Nope. The root_out should be initialized anyway since it's called
recursively with child's hroot_out.
Thanks,
Namhyung
> >
> > - hists__reset_stats(hists);
> > - hists__reset_col_len(hists);
> > -
> > while (next) {
> > n = rb_entry(next, struct hist_entry, rb_node_in);
> > next = rb_next(&n->rb_node_in);
> > --
> > 2.7.1
> >
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v6 10/25] perf hists: Resort hist entries with hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
Re: [PATCH v6 10/25] perf hists: Resort hist entries with hierarchy Jiri Olsa <jolsa@redhat.com> - 2016-02-21 00:20 +0100
Re: [PATCH v6 10/25] perf hists: Resort hist entries with hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-02-21 19:00 +0100
csiph-web