DEBUG(RDT_PLUGIN ": Core Groups Dump");
DEBUG(RDT_PLUGIN ": groups count: %" PRIsz, g_rdt->num_groups);
- for (int i = 0; i < g_rdt->num_groups; i++) {
+ for (size_t i = 0; i < g_rdt->num_groups; i++) {
core_group_t *cgroup = g_rdt->cores.cgroups + i;
memset(cores, 0, sizeof(cores));
return num_cores;
}
-static int rdt_is_core_id_valid(int core_id) {
+static int rdt_is_core_id_valid(unsigned int core_id) {
- for (int i = 0; i < g_rdt->pqos_cpu->num_cores; i++)
+ for (unsigned int i = 0; i < g_rdt->pqos_cpu->num_cores; i++)
if (core_id == g_rdt->pqos_cpu->cores[i].lcore)
return 1;
for (size_t group_idx = 0; group_idx < n; group_idx++) {
core_group_t *cgroup = g_rdt->cores.cgroups + group_idx;
for (size_t core_idx = 0; core_idx < cgroup->num_cores; core_idx++) {
- if (!rdt_is_core_id_valid((int)cgroup->cores[core_idx])) {
- ERROR(RDT_PLUGIN ": Core group '%s' contains invalid core id '%d'",
- cgroup->desc, (int)cgroup->cores[core_idx]);
+ if (!rdt_is_core_id_valid(cgroup->cores[core_idx])) {
+ ERROR(RDT_PLUGIN ": Core group '%s' contains invalid core id '%u'",
+ cgroup->desc, cgroup->cores[core_idx]);
rdt_free_cgroups();
return -EINVAL;
}
}
/* Get all available events on this platform */
- for (int i = 0; i < g_rdt->cap_mon->u.mon->num_events; i++)
+ for (unsigned int i = 0; i < g_rdt->cap_mon->u.mon->num_events; i++)
events |= g_rdt->cap_mon->u.mon->events[i].type;
events &= ~(PQOS_PERF_EVENT_LLC_MISS);
rdt_dump_data();
#endif /* COLLECT_DEBUG */
- for (int i = 0; i < g_rdt->num_groups; i++) {
+ for (size_t i = 0; i < g_rdt->num_groups; i++) {
core_group_t *cgroup = g_rdt->cores.cgroups + i;
enum pqos_mon_event mbm_events =
return ret;
/* Start monitoring */
- for (int i = 0; i < g_rdt->num_groups; i++) {
+ for (size_t i = 0; i < g_rdt->num_groups; i++) {
core_group_t *cg = g_rdt->cores.cgroups + i;
ret = pqos_mon_start(cg->num_cores, cg->cores, g_rdt->events[i],
return 0;
/* Stop monitoring */
- for (int i = 0; i < g_rdt->num_groups; i++) {
+ for (size_t i = 0; i < g_rdt->num_groups; i++) {
pqos_mon_stop(g_rdt->pgroups[i]);
}