fprintf(stderr, "%-13s%-*s%s\n",
e->tag,
verbose ? 25 : 0,
- verbose ? e->name : "",
+ verbose ? perf_mem_events__name(j) : "",
e->supported ? ": available" : "");
}
exit(0);
if (!perf_mem_events[j].supported) {
pr_err("failed: event '%s' not supported\n",
- perf_mem_events[j].name);
+ perf_mem_events__name(j));
return -1;
}
rec_argv[i++] = "-e";
- rec_argv[i++] = perf_mem_events[j].name;
+ rec_argv[i++] = perf_mem_events__name(j);
};
for (j = 0; j < argc; j++, i++)
#undef E
+char *perf_mem_events__name(int i)
+{
+ return (char *)perf_mem_events[i].name;
+}
+
int perf_mem_events__parse(const char *str)
{
char *tok, *saveptr = NULL;
int perf_mem_events__parse(const char *str);
int perf_mem_events__init(void);
+char *perf_mem_events__name(int i);
#endif /* __PERF_MEM_EVENTS_H */