[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190627074227.GC24279@krava>
Date: Thu, 27 Jun 2019 09:42:27 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: "Jin, Yao" <yao.jin@...ux.intel.com>
Cc: acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
mingo@...hat.com, alexander.shishkin@...ux.intel.com,
Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v5 4/7] perf diff: Use hists to manage basic blocks per
symbol
On Thu, Jun 27, 2019 at 03:34:38PM +0800, Jin, Yao wrote:
>
>
> On 6/27/2019 3:27 PM, Jiri Olsa wrote:
> > On Thu, Jun 27, 2019 at 10:09:26PM +0800, Jin Yao wrote:
> >
> > SNIP
> >
> > > +
> > > +static int process_block_per_sym(struct hist_entry *he)
> > > +{
> > > + struct annotation *notes;
> > > + struct cyc_hist *ch;
> > > + struct block_hist *bh;
> > > +
> > > + if (!he->ms.map || !he->ms.sym)
> > > + return 0;
> > > +
> > > + notes = symbol__annotation(he->ms.sym);
> > > + if (!notes || !notes->src || !notes->src->cycles_hist)
> > > + return 0;
> > > +
> > > + bh = container_of(he, struct block_hist, he);
> > > + init_block_hist(bh);
> > > +
> > > + ch = notes->src->cycles_hist;
> > > + for (unsigned int i = 0; i < symbol__size(he->ms.sym); i++) {
> > > + if (ch[i].num_aggr) {
> > > + struct block_info *bi;
> > > + struct hist_entry *he_block;
> > > +
> > > + bi = block_info__new();
> > > + if (!bi)
> > > + return -1;
> > > +
> > > + init_block_info(bi, he->ms.sym, &ch[i], i);
> > > + he_block = hists__add_entry_block(&bh->block_hists,
> > > + NULL, &dummy_al, bi);
> >
> > nit, it's the only caller of hists__add_entry_block, so we don't need
> > the 'ops' argument in there
> >
> > other than this, this all looks good to me
> >
> > Reviewed-by: Jiri Olsa <jolsa@...nel.org>
> >
> > thanks,
> > jirka
> >
>
> Hi Jiri,
>
> Thanks so much!
>
> Do you need me to send v6 which only removes the 'ops' argument from
> hists__add_entry_block? Or this v5 should be OK either?
please send v6, thanks
jirka
Powered by blists - more mailing lists