Perf: core: create/delete shared kernel/user events
This is a squash of the following two commits taken from msm-4.14
1) commit <e629221afd65> ("Perf: core: create/delete shared
kernel events").
Frequently drivers want to monitor some event like L2 misses
and cycles+instructions. If more than 1 driver wants to monitor
the same event and the event attributes are the same then we
can create just one instance of the event and let drivers
share the event. Add shared event create and delete
routines.
2) commit <f0453c73e167> ("perf: Add support for user and
kernel event sharing").
The ARM PMU counters are limited in number. Even for counting
similar events, the PMU driver allocates a new counter. Hence,
counters configured to count similar events are shared. This
was only possible for the kernel clients, but not for user-space
clients. Hence, as an extension to this, the kernel and the
user-space are now able to share the similar events. The counters
can be shared between user-space only clients, kernel only clients,
and among user-space and kernel clients. The kernel and user's
attr->type (hardware/raw) and attr->config should be same for them to
share the same counter.
Change-Id: I784db5a20968ba7fca20659186f23890bf6cc503
Signed-off-by:
Patrick Fay <pfay@codeaurora.org>
Signed-off-by:
Raghavendra Rao Ananta <rananta@codeaurora.org>
Signed-off-by:
Rishabh Bhatnagar <rishabhb@codeaurora.org>
Loading
Please register or sign in to comment