aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2013-01-18 14:54:00 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-01-24 14:40:50 -0500
commit5c6ccc3755650497234f9027a0ac9e3b2cf1ba9f (patch)
tree5b0eaf9164d6092640b3917d517745079c3b6ee9 /tools
parent6cee6cd310638cd5751eea0c81315b17eb7c28a9 (diff)
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: Jiri 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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/pmu.c20
-rw-r--r--tools/perf/util/pmu.h6
2 files changed, 13 insertions, 13 deletions
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index c107e24b75f8..244edbbe1969 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -85,7 +85,7 @@ static int pmu_format(char *name, struct list_head *format)
85 85
86static int perf_pmu__new_alias(struct list_head *list, char *name, FILE *file) 86static int perf_pmu__new_alias(struct list_head *list, char *name, FILE *file)
87{ 87{
88 struct perf_pmu__alias *alias; 88 struct perf_pmu_alias *alias;
89 char buf[256]; 89 char buf[256];
90 int ret; 90 int ret;
91 91
@@ -172,7 +172,7 @@ static int pmu_aliases(char *name, struct list_head *head)
172 return 0; 172 return 0;
173} 173}
174 174
175static int pmu_alias_terms(struct perf_pmu__alias *alias, 175static int pmu_alias_terms(struct perf_pmu_alias *alias,
176 struct list_head *terms) 176 struct list_head *terms)
177{ 177{
178 struct parse_events_term *term, *clone; 178 struct parse_events_term *term, *clone;
@@ -360,10 +360,10 @@ struct perf_pmu *perf_pmu__find(char *name)
360 return pmu_lookup(name); 360 return pmu_lookup(name);
361} 361}
362 362
363static struct perf_pmu__format* 363static struct perf_pmu_format *
364pmu_find_format(struct list_head *formats, char *name) 364pmu_find_format(struct list_head *formats, char *name)
365{ 365{
366 struct perf_pmu__format *format; 366 struct perf_pmu_format *format;
367 367
368 list_for_each_entry(format, formats, list) 368 list_for_each_entry(format, formats, list)
369 if (!strcmp(format->name, name)) 369 if (!strcmp(format->name, name))
@@ -405,7 +405,7 @@ static int pmu_config_term(struct list_head *formats,
405 struct perf_event_attr *attr, 405 struct perf_event_attr *attr,
406 struct parse_events_term *term) 406 struct parse_events_term *term)
407{ 407{
408 struct perf_pmu__format *format; 408 struct perf_pmu_format *format;
409 __u64 *vp; 409 __u64 *vp;
410 410
411 /* 411 /*
@@ -471,10 +471,10 @@ int perf_pmu__config(struct perf_pmu *pmu, struct perf_event_attr *attr,
471 return perf_pmu__config_terms(&pmu->format, attr, head_terms); 471 return perf_pmu__config_terms(&pmu->format, attr, head_terms);
472} 472}
473 473
474static struct perf_pmu__alias *pmu_find_alias(struct perf_pmu *pmu, 474static struct perf_pmu_alias *pmu_find_alias(struct perf_pmu *pmu,
475 struct parse_events_term *term) 475 struct parse_events_term *term)
476{ 476{
477 struct perf_pmu__alias *alias; 477 struct perf_pmu_alias *alias;
478 char *name; 478 char *name;
479 479
480 if (parse_events__is_hardcoded_term(term)) 480 if (parse_events__is_hardcoded_term(term))
@@ -508,7 +508,7 @@ static struct perf_pmu__alias *pmu_find_alias(struct perf_pmu *pmu,
508int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms) 508int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms)
509{ 509{
510 struct parse_events_term *term, *h; 510 struct parse_events_term *term, *h;
511 struct perf_pmu__alias *alias; 511 struct perf_pmu_alias *alias;
512 int ret; 512 int ret;
513 513
514 list_for_each_entry_safe(term, h, head_terms, list) { 514 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)
527int perf_pmu__new_format(struct list_head *list, char *name, 527int perf_pmu__new_format(struct list_head *list, char *name,
528 int config, unsigned long *bits) 528 int config, unsigned long *bits)
529{ 529{
530 struct perf_pmu__format *format; 530 struct perf_pmu_format *format;
531 531
532 format = zalloc(sizeof(*format)); 532 format = zalloc(sizeof(*format));
533 if (!format) 533 if (!format)
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index a313ed76a49a..e881dd180acb 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -12,14 +12,14 @@ enum {
12 12
13#define PERF_PMU_FORMAT_BITS 64 13#define PERF_PMU_FORMAT_BITS 64
14 14
15struct perf_pmu__format { 15struct perf_pmu_format {
16 char *name; 16 char *name;
17 int value; 17 int value;
18 DECLARE_BITMAP(bits, PERF_PMU_FORMAT_BITS); 18 DECLARE_BITMAP(bits, PERF_PMU_FORMAT_BITS);
19 struct list_head list; 19 struct list_head list;
20}; 20};
21 21
22struct perf_pmu__alias { 22struct perf_pmu_alias {
23 char *name; 23 char *name;
24 struct list_head terms; 24 struct list_head terms;
25 struct list_head list; 25 struct list_head list;
@@ -42,7 +42,7 @@ int perf_pmu__config_terms(struct list_head *formats,
42 struct list_head *head_terms); 42 struct list_head *head_terms);
43int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms); 43int perf_pmu__check_alias(struct perf_pmu *pmu, struct list_head *head_terms);
44struct list_head *perf_pmu__alias(struct perf_pmu *pmu, 44struct list_head *perf_pmu__alias(struct perf_pmu *pmu,
45 struct list_head *head_terms); 45 struct list_head *head_terms);
46int perf_pmu_wrap(void); 46int perf_pmu_wrap(void);
47void perf_pmu_error(struct list_head *list, char *name, char const *msg); 47void perf_pmu_error(struct list_head *list, char *name, char const *msg);
48 48