Skip to content

Commit

Permalink
slingshot_metrics: don't return an error from sample() when a device'…
Browse files Browse the repository at this point in the history
…s counter lookup fails
  • Loading branch information
morrone authored and tom95858 committed Nov 24, 2024
1 parent 317058e commit fb97e1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ldms/src/sampler/slingshot_metrics/slingshot_metrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,8 @@ static int sample(struct ldmsd_sampler *self)
&counters.value[j],
NULL);
if (rc != 0) {
ovis_log(mylog, OVIS_LWARNING, "sample(): cxil_read_cntr() failed for device %s\n",
dev_info->device_name);
cache_cxil_dev_close(dev);
/* FIXME - we should really free the record here,
and avoid adding it to the list, but there is
Expand All @@ -606,7 +608,7 @@ static int sample(struct ldmsd_sampler *self)
}
base_sample_end(sampler_base);

return rc;
return 0;
}

static void term(struct ldmsd_plugin *self)
Expand Down

0 comments on commit fb97e1c

Please sign in to comment.