|
@@ -645,6 +645,12 @@ int parse_events_add_pmu(struct list_head *list, int *idx,
|
|
|
|
|
|
memset(&attr, 0, sizeof(attr));
|
|
memset(&attr, 0, sizeof(attr));
|
|
|
|
|
|
|
|
+ if (!head_config) {
|
|
|
|
+ attr.type = pmu->type;
|
|
|
|
+ evsel = __add_event(list, idx, &attr, NULL, pmu->cpus);
|
|
|
|
+ return evsel ? 0 : -ENOMEM;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (perf_pmu__check_alias(pmu, head_config, &unit, &scale))
|
|
if (perf_pmu__check_alias(pmu, head_config, &unit, &scale))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|