selftests/powerpc/pmu: Add event_init_sampling function
authorMadhavan Srinivasan <maddy@linux.ibm.com>
Thu, 27 Jan 2022 07:19:57 +0000 (12:49 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 1 Mar 2022 12:38:13 +0000 (23:38 +1100)
commit54d4ba7f22d1ed5bfbc915771cf2e3e147cf03b2
tree4bfcdacce7da0e685da39b2f8d8c9649f95c83ec
parent5f6c3061af7ca3b0f9f8a20ec7a445671f7e6b5a
selftests/powerpc/pmu: Add event_init_sampling function

Extended event_init_opts() to include initialization of sampling
testcases. Patch adds an event_init_sampling() wrapper to initialize
event attribute fields for sampling events. This includes initializing
sample period, sample type and event type.

Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220127072012.662451-6-kjain@linux.ibm.com
tools/testing/selftests/powerpc/pmu/event.c
tools/testing/selftests/powerpc/pmu/event.h