summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/resctrl/resctrlfs.c
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2024-10-25 00:18:46 +0300
committerShuah Khan <skhan@linuxfoundation.org>2024-11-05 03:02:03 +0300
commit76f8f009f6bc89fd08edae69ccc705a9781fe42e (patch)
treec7ca85b8743f715a758eb5f56b2820bfee011421 /tools/testing/selftests/resctrl/resctrlfs.c
parent138424170eb06c956bc7e77e8740479161f65463 (diff)
downloadlinux-76f8f009f6bc89fd08edae69ccc705a9781fe42e.tar.xz
selftests/resctrl: Remove unused measurement code
The MBM and MBA resctrl selftests run a benchmark during which it takes measurements of read memory bandwidth via perf. Code exists to support measurements of write memory bandwidth but there exists no path with which this code can execute. While code exists for write memory bandwidth measurement there has not yet been a use case for it. Remove this unused code. Rename relevant functions to include "read" so that it is clear that it relates only to memory bandwidth reads, while renaming the functions also add consistency by changing the "membw" instances to more prevalent "mem_bw". Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl/resctrlfs.c')
-rw-r--r--tools/testing/selftests/resctrl/resctrlfs.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c
index a53cd1cb6e0c..d38d6dd90be4 100644
--- a/tools/testing/selftests/resctrl/resctrlfs.c
+++ b/tools/testing/selftests/resctrl/resctrlfs.c
@@ -831,23 +831,6 @@ int filter_dmesg(void)
return 0;
}
-const char *get_bw_report_type(const char *bw_report)
-{
- if (strcmp(bw_report, "reads") == 0)
- return bw_report;
- if (strcmp(bw_report, "writes") == 0)
- return bw_report;
- if (strcmp(bw_report, "nt-writes") == 0) {
- return "writes";
- }
- if (strcmp(bw_report, "total") == 0)
- return bw_report;
-
- fprintf(stderr, "Requested iMC bandwidth report type unavailable\n");
-
- return NULL;
-}
-
int perf_event_open(struct perf_event_attr *hw_event, pid_t pid, int cpu,
int group_fd, unsigned long flags)
{