[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180216075303.GD14831@krava>
Date: Fri, 16 Feb 2018 08:53:04 +0100
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] perf report: Fix a memory corrupton issue when enabling
--branch-history
On Fri, Feb 16, 2018 at 10:25:31AM +0800, Jin, Yao wrote:
SNIP
> > From my opinion, the option '--max-stack' in perf report looks not very
> > necessary. While it's just my personal opinion, need to hear from more
> > people. :)
> >
> > Thanks
> > Jin Yao
> >
> > > thanks,
> > > jirka
> > >
> > >
> > > ---
> > > diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
> > > index b6140950301e..b50b7b70dcca 100644
> > > --- a/tools/perf/util/hist.c
> > > +++ b/tools/perf/util/hist.c
> > > @@ -879,7 +879,7 @@ iter_prepare_cumulative_entry(struct
> > > hist_entry_iter *iter,
> > > * cumulated only one time to prevent entries more than 100%
> > > * overhead.
> > > */
> > > - he_cache = malloc(sizeof(*he_cache) * (iter->max_stack + 1));
> > > + he_cache = malloc(sizeof(*he_cache) * (callchain_cursor.nr + 1));
> > > if (he_cache == NULL)
> > > return -ENOMEM;
> > >
>
> Hi Jiri,
>
> I guess you will post this patch, right?
yep, later today
jirka
Powered by blists - more mailing lists