Skip to content

Commit

Permalink
mod_nvml use EVDebug
Browse files Browse the repository at this point in the history
  • Loading branch information
sflow committed Sep 18, 2023
1 parent ec16748 commit 6c3a17c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Linux/mod_nvml.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern "C" {
if (NVML_SUCCESS == nvmlDeviceGetHandleByIndex(ii, &gpu)) {
char uuidstr[128];
if(NVML_SUCCESS == nvmlDeviceGetUUID(gpu, uuidstr, 128)) {
myDebug(2, "nvml: deviceGetUUID(index=%u) returned %s", ii, uuidstr);
EVDebug(mod, 2, "nvml: deviceGetUUID(index=%u) returned %s", ii, uuidstr);
// uuuidstr may have "GPU-" prefix
char *uuidstr2 = uuidstr;
if(my_strnequal("GPU-", uuidstr2, 4))
Expand All @@ -65,10 +65,10 @@ extern "C" {
if(parseUUID(uuidstr2, id->uuid)) {
id->has_uuid = YES;
UTHashAdd(mdata->byUUID, id);
myDebug(1, "nvml: GPU uuid added to lookup table");
EVDebug(mod, 1, "nvml: GPU uuid added to lookup table");
}
else {
myDebug(1, "nvml: failed to parse GPU uuid");
EVDebug(mod, 1, "nvml: failed to parse GPU uuid");
}

unsigned int minor;
Expand All @@ -78,7 +78,7 @@ extern "C" {
UTHashAdd(mdata->byMinor, id);
}
else {
myDebug(1, "nvml: failed to retrieve GPU minor number");
EVDebug(mod, 1, "nvml: failed to retrieve GPU minor number");
}
}
}
Expand Down Expand Up @@ -217,7 +217,7 @@ extern "C" {
if(vm
&& vm->gpus
&& UTArrayN(vm->gpus) > 0) {
myDebug(2, "nvml: evt_vm_cs() %u vm->gpus", UTArrayN(vm->gpus));
EVDebug(mod, 2, "nvml: evt_vm_cs() %u vm->gpus", UTArrayN(vm->gpus));
// VM was assigned one or more GPU devices
SFLHost_gpu_nvml *nvml = init_gpu_nvml(&mdata->nvmlElem);
HSPGpuID *vmgpu;
Expand All @@ -239,11 +239,11 @@ extern "C" {
}

if(vmgpu->has_index) {
myDebug(2, "nvml: evt_vm_cs() accumulate(idx=%u)", vmgpu->index);
EVDebug(mod, 2, "nvml: evt_vm_cs() accumulate(idx=%u)", vmgpu->index);
accumulateGPUCounters(mod, nvml, vmgpu->index);
}
else {
myDebug(2, "nvml: evt_vm_cs() gpu uuid->id lookup failed");
EVDebug(mod, 2, "nvml: evt_vm_cs() gpu uuid->id lookup failed");
}
}
SFLADD_ELEMENT(ps->cs, &mdata->nvmlElem);
Expand Down

0 comments on commit 6c3a17c

Please sign in to comment.