|
@@ -72,7 +72,7 @@ static int pmu_format(char *name, struct list_head *format)
|
|
|
"%s/bus/event_source/devices/%s/format", sysfs, name);
|
|
|
|
|
|
if (stat(path, &st) < 0)
|
|
|
- return -1;
|
|
|
+ return 0; /* no error if format does not exist */
|
|
|
|
|
|
if (pmu_format_parse(path, format))
|
|
|
return -1;
|
|
@@ -252,6 +252,7 @@ static struct perf_pmu *pmu_lookup(char *name)
|
|
|
list_splice(&aliases, &pmu->aliases);
|
|
|
pmu->name = strdup(name);
|
|
|
pmu->type = type;
|
|
|
+ list_add_tail(&pmu->list, &pmus);
|
|
|
return pmu;
|
|
|
}
|
|
|
|