perf pmu: Fix usage of __ in struct names

In tools/perf we use a convention where __ separates the struct name
from the function name for functions that operate on a struct instance.

Fix this usage by removing it from the struct names and fix also the
associated functions.
Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-1tepcpohpvfg589pizx7tlkq@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 6cee6cd3
...@@ -85,7 +85,7 @@ static int pmu_format(char *name, struct list_head *format) ...@@ -85,7 +85,7 @@ static int pmu_format(char *name, struct list_head *format)
static int perf_pmu__new_alias(struct list_head *list, char *name, FILE *file) static int perf_pmu__new_alias(struct list_head *list, char *name, FILE *file)
{ {
struct perf_pmu__alias *alias; struct perf_pmu_alias *alias;
char buf[256]; char buf[256];
int ret; int ret;
...@@ -172,7 +172,7 @@ static int pmu_aliases(char *name, struct list_head *head) ...@@ -172,7 +172,7 @@ static int pmu_aliases(char *name, struct list_head *head)
return 0; return 0;
} }
static int pmu_alias_terms(struct perf_pmu__alias *alias, static int pmu_alias_terms(struct perf_pmu_alias *alias,
struct list_head *terms) struct list_head *terms)
{ {
struct parse_events_term *term, *clone; struct parse_events_term *term, *clone;
...@@ -360,10 +360,10 @@ struct perf_pmu *perf_pmu__find(char *name) ...@@ -360,10 +360,10 @@ struct perf_pmu *perf_pmu__find(char *name)
return pmu_lookup(name); return pmu_lookup(name);
} }
static struct perf_pmu__format* static struct perf_pmu_format *
pmu_find_format(struct list_head *formats, char *name) pmu_find_format(struct list_head *formats, char *name)
{ {
struct perf_pmu__format *format; struct perf_pmu_format *format;
list_for_each_entry(format, formats, list) list_for_each_entry(format, formats, list)
if (!strcmp(format->name, name)) if (!strcmp(format->name, name))
...@@ -405,7 +405,7 @@ static int pmu_config_term(struct list_head *formats, ...@@ -405,7 +405,7 @@ static int pmu_config_term(struct list_head *formats,
struct perf_event_attr *attr, struct perf_event_attr *attr,
struct parse_events_term *term) struct parse_events_term *term)
{ {
struct perf_pmu__format *format; struct perf_pmu_format *format;
__u64 *vp; __u64 *vp;
/* /*
...@@ -471,10 +471,10 @@ int perf_pmu__config(struct perf_pmu *pmu, struct perf_event_attr *attr, ...@@ -471,10 +471,10 @@ int perf_pmu__config(struct perf_pmu *pmu, struct perf_event_attr *attr,
return perf_pmu__config_terms(&pmu->format, attr, head_terms); return perf_pmu__config_terms(&pmu->format, attr, head_terms);
} }
static struct perf_pmu__alias *pmu_find_alias(struct perf_pmu *pmu, static struct perf_pmu_alias *pmu_find_alias(struct perf_pmu *pmu,
struct parse_events_term *term) struct parse_events_term *term)
{ {
struct perf_pmu__alias *alias; struct perf_pmu_alias *alias;
char *name; char *name;
if (parse_events__is_hardcoded_term(term)) if (parse_events__is_hardcoded_term(term))
...@@ -508,7 +508,7 @@ static struct perf_pmu__alias *pmu_find_alias(struct perf_pmu *pmu, ...@@ -508,7 +508,7 @@ static struct perf_pmu__alias *pmu_find_alias(struct perf_pmu *pmu,
int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms) int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms)
{ {
struct parse_events_term *term, *h; struct parse_events_term *term, *h;
struct perf_pmu__alias *alias; struct perf_pmu_alias *alias;
int ret; int ret;
list_for_each_entry_safe(term, h, head_terms, list) { list_for_each_entry_safe(term, h, head_terms, list) {
...@@ -527,7 +527,7 @@ int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms) ...@@ -527,7 +527,7 @@ int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms)
int perf_pmu__new_format(struct list_head *list, char *name, int perf_pmu__new_format(struct list_head *list, char *name,
int config, unsigned long *bits) int config, unsigned long *bits)
{ {
struct perf_pmu__format *format; struct perf_pmu_format *format;
format = zalloc(sizeof(*format)); format = zalloc(sizeof(*format));
if (!format) if (!format)
......
...@@ -12,14 +12,14 @@ enum { ...@@ -12,14 +12,14 @@ enum {
#define PERF_PMU_FORMAT_BITS 64 #define PERF_PMU_FORMAT_BITS 64
struct perf_pmu__format { struct perf_pmu_format {
char *name; char *name;
int value; int value;
DECLARE_BITMAP(bits, PERF_PMU_FORMAT_BITS); DECLARE_BITMAP(bits, PERF_PMU_FORMAT_BITS);
struct list_head list; struct list_head list;
}; };
struct perf_pmu__alias { struct perf_pmu_alias {
char *name; char *name;
struct list_head terms; struct list_head terms;
struct list_head list; struct list_head list;
...@@ -42,7 +42,7 @@ int perf_pmu__config_terms(struct list_head *formats, ...@@ -42,7 +42,7 @@ int perf_pmu__config_terms(struct list_head *formats,
struct list_head *head_terms); struct list_head *head_terms);
int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms); int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms);
struct list_head *perf_pmu__alias(struct perf_pmu *pmu, struct list_head *perf_pmu__alias(struct perf_pmu *pmu,
struct list_head *head_terms); struct list_head *head_terms);
int perf_pmu_wrap(void); int perf_pmu_wrap(void);
void perf_pmu_error(struct list_head *list, char *name, char const *msg); void perf_pmu_error(struct list_head *list, char *name, char const *msg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment