Cores "0-3" "4,6" "[12-15]"
HardwareEvents "L2_RQSTS.PF_MISS"
Cores "[1,2]"
- DispatchMultiPmu true
+ AggregateUncorePMUs true
</Plugin>
B<Options:>
configuration is applied - that is separate group is created for each core.
This option can be used once for every B<HardwareEvents> set.
-=item B<DispatchMultiPmu> B<false>|B<true>
+=item B<AggregateUncorePMUs> B<false>|B<true>
This option toggles the event value reporting from all the uncore PMUs to
either dispatch as aggregated value in a single metric or dispatch as
-individual values. If DispatchMultiPmu is set to 'false' uncore events are
+individual values. If B<AggregateUncorePMUs> is set to 'true' uncore events are
reported as single metric, even for multi PMU. The total value is obtained by
-summing all counters across all the units (e.g. CHAs). If DispatchMultiPmu is
-set to 'true' all cloned PMUs are dispatched separately with PMU name added to
-Collectd's I<plugin_instance>.
+summing all counters across all the units (e.g. CHAs). If B<AggregateUncorePMUs>
+is set to 'false' all cloned PMUs are dispatched separately with PMU name added
+to Collectd's I<plugin_instance>.
=back
static void pmu_dump_config(void) {
DEBUG(PMU_PLUGIN ": Config:");
- DEBUG(PMU_PLUGIN ": dispatch_cloned_pmus: %d", g_ctx.dispatch_cloned_pmus);
+ DEBUG(PMU_PLUGIN ": AggregateUncorePMUs : %d", !g_ctx.dispatch_cloned_pmus);
DEBUG(PMU_PLUGIN ": event list file : %s", g_ctx.event_list_fn);
unsigned int i = 0;
} else {
ret = config_cores_parse(child, &g_ctx.entl->cores);
}
- } else if (strcasecmp("DispatchMultiPmu", child->key) == 0) {
- ret = cf_util_get_boolean(child, &g_ctx.dispatch_cloned_pmus);
+ } else if (strcasecmp("AggregateUncorePMUs", child->key) == 0) {
+ bool aggregate = true;
+ ret = cf_util_get_boolean(child, &aggregate);
+ if (ret == 0)
+ g_ctx.dispatch_cloned_pmus = !aggregate;
} else {
ERROR(PMU_PLUGIN ": Unknown configuration parameter \"%s\".", child->key);
ret = -1;
char type_path[PATH_MAX];
char buf[16];
ssize_t len;
- uint32_t val = 0;
+ unsigned int val = 0;
ssnprintf(type_path, sizeof(type_path), "%s/type",
ce->extra.pmus.gl_pathv[i]);
int fd = open(type_path, O_RDONLY);
}
buf[len] = '\0';
- if (sscanf(buf, "%d", &val) != 1) {
+ if (sscanf(buf, "%u", &val) != 1) {
WARNING(PMU_PLUGIN ": failed to read number from `%s`.", buf);
close(fd);
continue;
size_t group_events_count = 0;
char *events = strdup(e[i]);
- if (!events)
+ if (events == NULL)
return -1;
bool group = strrchr(events, ',') != NULL ? true : false;
e->efd[j].fd = -1;
if (resolve_event_extra(s, &e->attr, &e->extra) != 0) {
- WARNING(PMU_PLUGIN ": Cannot resolve %s", s);
+ INFO(PMU_PLUGIN ": Cannot resolve %s", s);
sfree(e);
continue;
}
el->eventlist_last = e;
e->event = strdup(s);
- if (e->extra.multi_pmu && pmu_add_cloned_pmus(el, e) != 0)
+ if (e->extra.multi_pmu && pmu_add_cloned_pmus(el, e) != 0) {
+ sfree(events);
return -1;
+ }
group_events_count++;
}