/* GPU specific disable flags */
gpu_disable_t disabled;
zes_device_handle_t handle;
- /* report counter */
- uint64_t counter;
+ /* how many times metrics have been checked */
+ uint64_t check_count;
} gpu_device_t;
typedef enum {
unsigned int i;
for (i = 0; i < count; i++) {
gpus[i].disabled = config.disabled;
- gpus[i].counter = 0;
+ gpus[i].check_count = 0;
}
gpu_count = count;
return RET_OK;
}
gpu_disable_t initial = *disabled;
- if (!gpu->counter) {
+ if (!gpu->check_count) {
INFO(PLUGIN_NAME ": GPU-%d queries:", i);
}
/* 'cache_idx' is high frequency sampling aggregation counter.
* them to gpu_submit().
*/
unsigned int cache_idx =
- (config.samples - 1) - gpu->counter % config.samples;
+ (config.samples - 1) - gpu->check_count % config.samples;
/* get potentially high-frequency metrics data (aggregate metrics sent when
* counter=0)
*/
/* rest of the metrics are read only when the high frequency
* counter goes down to zero
*/
- gpu->counter++;
+ gpu->check_count++;
if (cache_idx > 0) {
if (!disabled->all) {
/* there are still valid counters at least for this GPU */
}
/* process lower frequency counters */
- if (config.samples > 1 && gpu->counter <= config.samples) {
+ if (config.samples > 1 && gpu->check_count <= config.samples) {
INFO(PLUGIN_NAME ": GPU-%d queries:", i);
}
/* get lower frequency metrics */