[PATCH 1/2] perf stat: Fix segfault when counting armv8_pmu events
Namhyung Kim
namhyung at kernel.org
Wed Sep 23 10:15:06 EDT 2020
On Wed, Sep 23, 2020 at 11:08 PM Jiri Olsa <jolsa at redhat.com> wrote:
>
> On Wed, Sep 23, 2020 at 10:49:52PM +0900, Namhyung Kim wrote:
> > On Wed, Sep 23, 2020 at 2:44 PM Jiri Olsa <jolsa at redhat.com> wrote:
> > >
> > > On Tue, Sep 22, 2020 at 11:13:45AM +0800, Wei Li wrote:
> > > > When executing perf stat with armv8_pmu events with a workload, it will
> > > > report a segfault as result.
> > >
> > > please share the perf stat command line you see that segfault for
> >
> > It seems the description in the patch 0/2 already has it:
> >
> > [root at localhost hulk]# tools/perf/perf stat -e
> > armv8_pmuv3_0/ll_cache_rd/,armv8_pmuv3_0/ll_cache_miss_rd/ ls >
> > /dev/null
> > Segmentation fault
>
> yea I found it, but can't reproduce it.. I see the issue from
> patch 2, but not sure what's the problem so far
I think the problem is that armv8_pmu has a cpumask,
and the user requested per-task events.
The code tried to open the event with a dummy cpu map
since it's not a cpu event, but the pmu has cpu map and
it's passed to evsel. So there's confusion somewhere
whether it should use evsel->cpus or a dummy map.
Thanks
Namhyung
More information about the linux-arm-kernel
mailing list