/**
* collectd - src/intel_rdt.c
*
- * Copyright(c) 2016 Intel Corporation. All rights reserved.
+ * Copyright(c) 2016-2018 Intel Corporation. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
**/
#include "common.h"
-#include "collectd.h"
-
#include "utils_config_cores.h"
+#include "collectd.h"
#include <pqos.h>
};
typedef struct rdt_ctx_s rdt_ctx_t;
-static rdt_ctx_t *g_rdt = NULL;
+static rdt_ctx_t *g_rdt;
static rdt_config_status g_state = UNKNOWN;
return;
DEBUG(RDT_PLUGIN ": Core Groups Dump");
- DEBUG(RDT_PLUGIN ": groups count: %zu", g_rdt->num_groups);
+ DEBUG(RDT_PLUGIN ": groups count: %" PRIsz, g_rdt->num_groups);
for (int i = 0; i < g_rdt->num_groups; i++) {
core_group_t *cgroup = g_rdt->cores.cgroups + i;
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])) {
+ 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]);
rdt_free_cgroups();
ERROR(RDT_PLUGIN ": Error creating default core groups configuration.");
return ret;
}
- n = (size_t) ret;
+ n = (size_t)ret;
INFO(RDT_PLUGIN
": No core groups configured. Default core groups created.");
}