[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fWFCtXmGukRg2ZDd5Rtf2mzKQ_+fgOrRnOXjD-K13bm0A@mail.gmail.com>
Date: Wed, 20 Jul 2022 08:09:50 -0700
From: Ian Rogers <irogers@...gle.com>
To: Vince Weaver <vincent.weaver@...ne.edu>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Kajol Jain <kjain@...ux.ibm.com>,
Andi Kleen <ak@...ux.intel.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Anshuman Khandual <anshuman.khandual@....com>,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
Rob Herring <robh@...nel.org>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v3 3/3] perf test: Add user space counter reading tests
On Wed, Jul 20, 2022 at 7:57 AM Vince Weaver <vincent.weaver@...ne.edu> wrote:
>
> On Tue, 19 Jul 2022, Ian Rogers wrote:
>
> > These tests are based on test_stat_user_read in
> > tools/lib/perf/tests/test-evsel.c. The tests are modified to skip if
> > perf_event_open fails or rdpmc isn't supported.
> >
> > Signed-off-by: Ian Rogers <irogers@...gle.com>
>
> > + .type = PERF_TYPE_HARDWARE,
> > + .config = event,
> > +#ifdef __aarch64__
> > + .config1 = 0x2, /* Request user access */
> > +#endif
>
> should this value have a name rather than being a "magic constant"?
Thanks! Firstly, this is just moving code around and so not a
regression introduced by this code:
https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/lib/perf/tests/test-evsel.c?h=perf/core#n134
I don't believe there is an existing constant for this purpose. The
kernel isn't using one either:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/kernel/perf_event.c#n309
So I agree with you and hopefully this is something ARM will clean up.
Thanks,
Ian
> Vince
Powered by blists - more mailing lists