pmu = NULL;
len = 0;
- while ((pmu = perf_pmu__scan(pmu)) != NULL)
+ while ((pmu = perf_pmu__scan(pmu)) != NULL) {
list_for_each_entry(alias, &pmu->aliases, list)
len++;
+ if (pmu->selectable)
+ len++;
+ }
aliases = malloc(sizeof(char *) * len);
if (!aliases)
return;
pmu = NULL;
j = 0;
- while ((pmu = perf_pmu__scan(pmu)) != NULL)
+ while ((pmu = perf_pmu__scan(pmu)) != NULL) {
list_for_each_entry(alias, &pmu->aliases, list) {
char *name = format_alias(buf, sizeof(buf), pmu, alias);
bool is_cpu = !strcmp(pmu->name, "cpu");
aliases[j] = strdup(aliases[j]);
j++;
}
+ if (pmu->selectable) {
+ scnprintf(buf, sizeof(buf), "%s//", pmu->name);
+ aliases[j] = strdup(buf);
+ j++;
+ }
+ }
len = j;
qsort(aliases, len, sizeof(char *), cmp_string);
for (j = 0; j < len; j++) {