intel_rdt: add PQOS API stubs for pid monitoring.
authorStarzyk, MateuszX <mateuszx.starzyk@intel.com>
Thu, 1 Mar 2018 10:08:28 +0000 (10:08 +0000)
committerAleksinski, MichalX <michalx.aleksinski@intel.com>
Wed, 6 Mar 2019 06:06:26 +0000 (06:06 +0000)
Add temporary functions to enable further development of rdt plugin.
These stubbed functions will be removed once libpqos extends it's API.

Change-Id: I39dd428e39fd6055774dfc39b4c0690aedee4ebe
Signed-off-by: Starzyk, MateuszX <mateuszx.starzyk@intel.com>
src/intel_rdt.c

index 446dc65..842abe6 100644 (file)
  */
 #define RDT_MAX_PROC_COMM_LENGTH 16
 
+/* PQOS API STUB
+ * In future: Start monitoring for PID group. For perf grouping will be added.
+ * Currently: Start monitoring only for the first PID.
+ */
+__attribute__((unused)) static int
+pqos_mon_start_pids(const unsigned num_pids, const pid_t *pids,
+                    const enum pqos_mon_event event, void *context,
+                    struct pqos_mon_data *group) {
+
+  assert(num_pids > 0);
+  assert(pids);
+  return pqos_mon_start_pid(pids[0], event, context, group);
+}
+
+/* PQOS API STUB
+ * In future: Add PIDs to the monitoring group. Supported for resctrl monitoring
+ * only.
+ * Currently: Does nothing.
+ */
+__attribute__((unused)) static int
+pqos_mon_add_pids(const unsigned num_pids, const pid_t *pids, void *context,
+                  struct pqos_mon_data *group) {
+  return PQOS_RETVAL_OK;
+}
+
+/* PQOS API STUB
+ * In future: Remove PIDs from the monitoring group. Supported for resctrl
+ * monitoring only.
+ * Currently: Does nothing.
+ */
+__attribute__((unused)) static int
+pqos_mon_remove_pids(const unsigned num_pids, const pid_t *pids, void *context,
+                     struct pqos_mon_data *group) {
+  return PQOS_RETVAL_OK;
+}
+
 typedef enum {
   UNKNOWN = 0,
   CONFIGURATION_ERROR,