[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZFvWRFGJlAPsgsZL@kernel.org>
Date: Wed, 10 May 2023 14:37:08 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Sandipan Das <sandipan.das@....com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
peterz@...radead.org, mingo@...hat.com, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
irogers@...gle.com, adrian.hunter@...el.com, terrelln@...com,
ravi.bangoria@....com, ananth.narayan@....com
Subject: Re: [PATCH 1/2] perf script: Skip aggregation for stat events
Em Fri, May 05, 2023 at 04:43:20PM -0700, Namhyung Kim escreveu:
> Hello,
>
> On Fri, May 5, 2023 at 3:03 AM Sandipan Das <sandipan.das@....com> wrote:
> >
> > The script command does not support aggregation modes by itself although
> > that can be achieved using post-processing scripts. Because of this, it
> > does not allocate memory for aggregated event values.
> >
> > Upon running perf stat record, the aggregation mode is set in the perf
> > data file. If the mode is AGGR_GLOBAL, the aggregated event values are
> > accessed and this leads to a segmentation fault since these were never
> > allocated to begin with. Set the mode to AGGR_NONE explicitly to avoid
> > this.
> >
> > E.g.
> >
> > $ perf stat record -e cycles true
> > $ perf script
> >
> > Before:
> > Segmentation fault (core dumped)
> >
> > After:
> > CPU THREAD VAL ENA RUN TIME EVENT
> > -1 231919 162831 362069 362069 935289 cycles:u
> >
> > Fixes: 8b76a3188b85 ("perf stat: Remove unused perf_counts.aggr field")
> > Signed-off-by: Sandipan Das <sandipan.das@....com>
> > Cc: stable@...r.kernel.org # v6.2+
>
> Acked-by: Namhyung Kim <namhyung@...nel.org>
Thanks, applied both to perf-tools, for v6.4.
- Arnaldo
Powered by blists - more mailing lists