Re: [RFC] libperf: Add support for user space counter access

2020-08-12 Thread Jiri Olsa
On Tue, Aug 11, 2020 at 10:49:30AM -0600, Rob Herring wrote: > On Tue, Aug 11, 2020 at 4:50 AM Jiri Olsa wrote: > > > > On Mon, Aug 10, 2020 at 12:11:23PM -0600, Rob Herring wrote: > > > On Sat, Aug 8, 2020 at 4:22 AM Jiri Olsa wrote: > > > > > > > > On Fri, Aug 07, 2020 at 05:05:17PM -0600, Rob

Re: [RFC] libperf: Add support for user space counter access

2020-08-11 Thread Rob Herring
On Tue, Aug 11, 2020 at 4:50 AM Jiri Olsa wrote: > > On Mon, Aug 10, 2020 at 12:11:23PM -0600, Rob Herring wrote: > > On Sat, Aug 8, 2020 at 4:22 AM Jiri Olsa wrote: > > > > > > On Fri, Aug 07, 2020 at 05:05:17PM -0600, Rob Herring wrote: > > > > x86 and arm64 can both support direct access of ev

Re: [RFC] libperf: Add support for user space counter access

2020-08-11 Thread peterz
On Tue, Aug 11, 2020 at 12:50:27PM +0200, Jiri Olsa wrote: > if it works for all events, which I'm not sure of That's what we have cap_user_rdpmc for.

Re: [RFC] libperf: Add support for user space counter access

2020-08-11 Thread Jiri Olsa
On Mon, Aug 10, 2020 at 12:11:23PM -0600, Rob Herring wrote: > On Sat, Aug 8, 2020 at 4:22 AM Jiri Olsa wrote: > > > > On Fri, Aug 07, 2020 at 05:05:17PM -0600, Rob Herring wrote: > > > x86 and arm64 can both support direct access of event counters in > > > userspace. The access sequence is less t

Re: [RFC] libperf: Add support for user space counter access

2020-08-10 Thread Peter Zijlstra
On Fri, Aug 07, 2020 at 05:05:17PM -0600, Rob Herring wrote: > x86 and arm64 can both support direct access of event counters in > userspace. The access sequence is less than trivial and currently exists > in perf test code (tools/perf/arch/x86/tests/rdpmc.c) with copies in > projects such as PAPI

Re: [RFC] libperf: Add support for user space counter access

2020-08-10 Thread Rob Herring
On Sat, Aug 8, 2020 at 4:22 AM Jiri Olsa wrote: > > On Fri, Aug 07, 2020 at 05:05:17PM -0600, Rob Herring wrote: > > x86 and arm64 can both support direct access of event counters in > > userspace. The access sequence is less than trivial and currently exists > > in perf test code (tools/perf/arch

Re: [RFC] libperf: Add support for user space counter access

2020-08-08 Thread Jiri Olsa
On Fri, Aug 07, 2020 at 05:05:17PM -0600, Rob Herring wrote: > x86 and arm64 can both support direct access of event counters in > userspace. The access sequence is less than trivial and currently exists > in perf test code (tools/perf/arch/x86/tests/rdpmc.c) with copies in > projects such as PAPI