aboutsummaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2024-06-10 18:14:52 +0300
committerShuah Khan <skhan@linuxfoundation.org>2024-07-11 11:23:54 -0600
commitfa1116d06ebc4673c4e8ca23d8e7ef73db544480 (patch)
treeaed1adf3b064cd056edc773043616603ca968ad4 /tools/perf
parentaef5efa64426396cac5b0126cbb6071e92d5da24 (diff)
selftests/resctrl: Simplify bandwidth report type handling
bw_report is only needed for selecting the correct value from the values IMC measured. It is a member in the resctrl_val_param struct and is always set to "reads". The value is then checked in resctrl_val() using validate_bw_report_request() that besides validating the input, assumes it can mutate the string which is questionable programming practice. Simplify handling bw_report: - Convert validate_bw_report_request() into get_bw_report_type() that inputs and returns const char *. Use NULL to indicate error. - Validate the report types inside measure_mem_bw(), not in resctrl_val(). - Pass bw_report to measure_mem_bw() from ->measure() hook because resctrl_val() no longer needs bw_report for anything. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/perf')
0 files changed, 0 insertions, 0 deletions