diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-01-18 14:56:57 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-01-24 14:40:51 -0500 |
commit | 23b6339b914ec009ba206584a410039b589243aa (patch) | |
tree | a5abfabc39badf66472fed0a3034203353a7bec5 /tools/perf/tests/parse-events.c | |
parent | 7c3102b843a581b4b84643a18d423f8807364ca0 (diff) |
perf tools: Fix usage of __ in event parsing 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-kdcoh7uitivx68otqcz12aaz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/parse-events.c')
-rw-r--r-- | tools/perf/tests/parse-events.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index 9ac45c58305e..20acaff295d2 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c | |||
@@ -840,13 +840,13 @@ static int test__all_tracepoints(struct perf_evlist *evlist) | |||
840 | return test__checkevent_tracepoint_multi(evlist); | 840 | return test__checkevent_tracepoint_multi(evlist); |
841 | } | 841 | } |
842 | 842 | ||
843 | struct test__event_st { | 843 | struct evlist_test { |
844 | const char *name; | 844 | const char *name; |
845 | __u32 type; | 845 | __u32 type; |
846 | int (*check)(struct perf_evlist *evlist); | 846 | int (*check)(struct perf_evlist *evlist); |
847 | }; | 847 | }; |
848 | 848 | ||
849 | static struct test__event_st test__events[] = { | 849 | static struct evlist_test test__events[] = { |
850 | [0] = { | 850 | [0] = { |
851 | .name = "syscalls:sys_enter_open", | 851 | .name = "syscalls:sys_enter_open", |
852 | .check = test__checkevent_tracepoint, | 852 | .check = test__checkevent_tracepoint, |
@@ -985,7 +985,7 @@ static struct test__event_st test__events[] = { | |||
985 | }, | 985 | }, |
986 | }; | 986 | }; |
987 | 987 | ||
988 | static struct test__event_st test__events_pmu[] = { | 988 | static struct evlist_test test__events_pmu[] = { |
989 | [0] = { | 989 | [0] = { |
990 | .name = "cpu/config=10,config1,config2=3,period=1000/u", | 990 | .name = "cpu/config=10,config1,config2=3,period=1000/u", |
991 | .check = test__checkevent_pmu, | 991 | .check = test__checkevent_pmu, |
@@ -996,20 +996,20 @@ static struct test__event_st test__events_pmu[] = { | |||
996 | }, | 996 | }, |
997 | }; | 997 | }; |
998 | 998 | ||
999 | struct test__term { | 999 | struct terms_test { |
1000 | const char *str; | 1000 | const char *str; |
1001 | __u32 type; | 1001 | __u32 type; |
1002 | int (*check)(struct list_head *terms); | 1002 | int (*check)(struct list_head *terms); |
1003 | }; | 1003 | }; |
1004 | 1004 | ||
1005 | static struct test__term test__terms[] = { | 1005 | static struct terms_test test__terms[] = { |
1006 | [0] = { | 1006 | [0] = { |
1007 | .str = "config=10,config1,config2=3,umask=1", | 1007 | .str = "config=10,config1,config2=3,umask=1", |
1008 | .check = test__checkterms_simple, | 1008 | .check = test__checkterms_simple, |
1009 | }, | 1009 | }, |
1010 | }; | 1010 | }; |
1011 | 1011 | ||
1012 | static int test_event(struct test__event_st *e) | 1012 | static int test_event(struct evlist_test *e) |
1013 | { | 1013 | { |
1014 | struct perf_evlist *evlist; | 1014 | struct perf_evlist *evlist; |
1015 | int ret; | 1015 | int ret; |
@@ -1031,13 +1031,13 @@ static int test_event(struct test__event_st *e) | |||
1031 | return ret; | 1031 | return ret; |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | static int test_events(struct test__event_st *events, unsigned cnt) | 1034 | static int test_events(struct evlist_test *events, unsigned cnt) |
1035 | { | 1035 | { |
1036 | int ret1, ret2 = 0; | 1036 | int ret1, ret2 = 0; |
1037 | unsigned i; | 1037 | unsigned i; |
1038 | 1038 | ||
1039 | for (i = 0; i < cnt; i++) { | 1039 | for (i = 0; i < cnt; i++) { |
1040 | struct test__event_st *e = &events[i]; | 1040 | struct evlist_test *e = &events[i]; |
1041 | 1041 | ||
1042 | pr_debug("running test %d '%s'\n", i, e->name); | 1042 | pr_debug("running test %d '%s'\n", i, e->name); |
1043 | ret1 = test_event(e); | 1043 | ret1 = test_event(e); |
@@ -1048,7 +1048,7 @@ static int test_events(struct test__event_st *events, unsigned cnt) | |||
1048 | return ret2; | 1048 | return ret2; |
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | static int test_term(struct test__term *t) | 1051 | static int test_term(struct terms_test *t) |
1052 | { | 1052 | { |
1053 | struct list_head *terms; | 1053 | struct list_head *terms; |
1054 | int ret; | 1054 | int ret; |
@@ -1072,13 +1072,13 @@ static int test_term(struct test__term *t) | |||
1072 | return ret; | 1072 | return ret; |
1073 | } | 1073 | } |
1074 | 1074 | ||
1075 | static int test_terms(struct test__term *terms, unsigned cnt) | 1075 | static int test_terms(struct terms_test *terms, unsigned cnt) |
1076 | { | 1076 | { |
1077 | int ret = 0; | 1077 | int ret = 0; |
1078 | unsigned i; | 1078 | unsigned i; |
1079 | 1079 | ||
1080 | for (i = 0; i < cnt; i++) { | 1080 | for (i = 0; i < cnt; i++) { |
1081 | struct test__term *t = &terms[i]; | 1081 | struct terms_test *t = &terms[i]; |
1082 | 1082 | ||
1083 | pr_debug("running test %d '%s'\n", i, t->str); | 1083 | pr_debug("running test %d '%s'\n", i, t->str); |
1084 | ret = test_term(t); | 1084 | ret = test_term(t); |
@@ -1129,7 +1129,7 @@ static int test_pmu_events(void) | |||
1129 | 1129 | ||
1130 | while (!ret && (ent = readdir(dir))) { | 1130 | while (!ret && (ent = readdir(dir))) { |
1131 | #define MAX_NAME 100 | 1131 | #define MAX_NAME 100 |
1132 | struct test__event_st e; | 1132 | struct evlist_test e; |
1133 | char name[MAX_NAME]; | 1133 | char name[MAX_NAME]; |
1134 | 1134 | ||
1135 | if (!strcmp(ent->d_name, ".") || | 1135 | if (!strcmp(ent->d_name, ".") || |