From: Starzyk, MateuszX Date: Thu, 1 Mar 2018 10:08:28 +0000 (+0000) Subject: intel_rdt: add PQOS API stubs for pid monitoring. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d258bc9d462c7a86ace8a514098d67fdf4ef832a;p=collectd.git intel_rdt: add PQOS API stubs for pid monitoring. 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 --- diff --git a/src/intel_rdt.c b/src/intel_rdt.c index 446dc655..842abe61 100644 --- a/src/intel_rdt.c +++ b/src/intel_rdt.c @@ -42,6 +42,42 @@ */ #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,