Re: [PATCH 01/17] perf hists: Basic support of hierarchical report view

From: Namhyung Kim
Date: Thu Jan 21 2016 - 08:02:57 EST


On Thu, Jan 21, 2016 at 12:35:11PM +0100, Jiri Olsa wrote:
> On Sun, Jan 17, 2016 at 01:03:01AM +0900, Namhyung Kim wrote:
>
> SNIP
>
> > diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
> > index 687bbb124428..15a75d44de91 100644
> > --- a/tools/perf/util/sort.h
> > +++ b/tools/perf/util/sort.h
> > @@ -94,9 +94,11 @@ struct hist_entry {
> > s32 socket;
> > s32 cpu;
> > u8 cpumode;
> > + u8 depth;
> >
> > /* We are added by hists__add_dummy_entry. */
> > bool dummy;
> > + bool leaf;
> >
> > char level;
> > u8 filtered;
> > @@ -118,13 +120,22 @@ struct hist_entry {
> > char *srcline;
> > char *srcfile;
> > struct symbol *parent;
> > - struct rb_root sorted_chain;
> > struct branch_info *branch_info;
> > struct hists *hists;
> > struct mem_info *mem_info;
> > void *raw_data;
> > u32 raw_size;
> > void *trace_output;
> > + struct perf_hpp_fmt *fmt;
> > + struct hist_entry *parent_he;
> > + union {
> > + /* this is for hierarchical entry structure */
> > + struct {
> > + struct rb_root hroot_in;
> > + struct rb_root hroot_out;
>
> we use 'entries_in' and 'entries' in hists object
>
> could we keep the names in here as well to indicate
> it's doing the same stuff..?

Maybe it's a preference. I don't think it's necessary, sometimes we
need to differentiate whether it accesses to (top-level) hists or hist
entry IMHO.

Thanks,
Namhyung