selftests/resctrl: Remove nested calls in perf event handling
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 15 Dec 2023 15:05:00 +0000 (17:05 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 13 Feb 2024 20:56:44 +0000 (13:56 -0700)
commit3c6bfc9cc7f0e3bed76ff0a7ed5bf89059b7b0bd
tree84e6b5900fa7e221074a33ddef9f28bd19a02339
parent33403bc7fe2ec35cd87e4f11db4d1a1da1e5ce12
selftests/resctrl: Remove nested calls in perf event handling

Perf event handling has functions that are the sole caller of another
perf event handling related function:
  - reset_enable_llc_perf() calls perf_event_open_llc_miss()
  - perf_event_measure() calls get_llc_perf()

Remove the extra layer of calls to make the code easier to follow by
moving the code into the calling function.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/cache.c