aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r--tools/perf/util/parse-events.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index f18a9a006e1b..9d5f1ca50e6f 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -22,26 +22,26 @@ struct event_symbol {
22#define CR(x, y) .type = PERF_TYPE_##x, .config = y 22#define CR(x, y) .type = PERF_TYPE_##x, .config = y
23 23
24static struct event_symbol event_symbols[] = { 24static struct event_symbol event_symbols[] = {
25 { C(HARDWARE, CPU_CYCLES), "cpu-cycles", }, 25 { C(HARDWARE, HW_CPU_CYCLES), "cpu-cycles", },
26 { C(HARDWARE, CPU_CYCLES), "cycles", }, 26 { C(HARDWARE, HW_CPU_CYCLES), "cycles", },
27 { C(HARDWARE, INSTRUCTIONS), "instructions", }, 27 { C(HARDWARE, HW_INSTRUCTIONS), "instructions", },
28 { C(HARDWARE, CACHE_REFERENCES), "cache-references", }, 28 { C(HARDWARE, HW_CACHE_REFERENCES), "cache-references", },
29 { C(HARDWARE, CACHE_MISSES), "cache-misses", }, 29 { C(HARDWARE, HW_CACHE_MISSES), "cache-misses", },
30 { C(HARDWARE, BRANCH_INSTRUCTIONS), "branch-instructions", }, 30 { C(HARDWARE, HW_BRANCH_INSTRUCTIONS),"branch-instructions", },
31 { C(HARDWARE, BRANCH_INSTRUCTIONS), "branches", }, 31 { C(HARDWARE, HW_BRANCH_INSTRUCTIONS),"branches", },
32 { C(HARDWARE, BRANCH_MISSES), "branch-misses", }, 32 { C(HARDWARE, HW_BRANCH_MISSES), "branch-misses", },
33 { C(HARDWARE, BUS_CYCLES), "bus-cycles", }, 33 { C(HARDWARE, HW_BUS_CYCLES), "bus-cycles", },
34 34
35 { C(SOFTWARE, CPU_CLOCK), "cpu-clock", }, 35 { C(SOFTWARE, SW_CPU_CLOCK), "cpu-clock", },
36 { C(SOFTWARE, TASK_CLOCK), "task-clock", }, 36 { C(SOFTWARE, SW_TASK_CLOCK), "task-clock", },
37 { C(SOFTWARE, PAGE_FAULTS), "page-faults", }, 37 { C(SOFTWARE, SW_PAGE_FAULTS), "page-faults", },
38 { C(SOFTWARE, PAGE_FAULTS), "faults", }, 38 { C(SOFTWARE, SW_PAGE_FAULTS), "faults", },
39 { C(SOFTWARE, PAGE_FAULTS_MIN), "minor-faults", }, 39 { C(SOFTWARE, SW_PAGE_FAULTS_MIN), "minor-faults", },
40 { C(SOFTWARE, PAGE_FAULTS_MAJ), "major-faults", }, 40 { C(SOFTWARE, SW_PAGE_FAULTS_MAJ), "major-faults", },
41 { C(SOFTWARE, CONTEXT_SWITCHES), "context-switches", }, 41 { C(SOFTWARE, SW_CONTEXT_SWITCHES), "context-switches", },
42 { C(SOFTWARE, CONTEXT_SWITCHES), "cs", }, 42 { C(SOFTWARE, SW_CONTEXT_SWITCHES), "cs", },
43 { C(SOFTWARE, CPU_MIGRATIONS), "cpu-migrations", }, 43 { C(SOFTWARE, SW_CPU_MIGRATIONS), "cpu-migrations", },
44 { C(SOFTWARE, CPU_MIGRATIONS), "migrations", }, 44 { C(SOFTWARE, SW_CPU_MIGRATIONS), "migrations", },
45}; 45};
46 46
47#define __PERF_COUNTER_FIELD(config, name) \ 47#define __PERF_COUNTER_FIELD(config, name) \
@@ -107,7 +107,7 @@ char *event_name(int counter)
107 107
108 switch (type) { 108 switch (type) {
109 case PERF_TYPE_HARDWARE: 109 case PERF_TYPE_HARDWARE:
110 if (config < PERF_HW_EVENTS_MAX) 110 if (config < PERF_COUNT_HW_MAX)
111 return hw_event_names[config]; 111 return hw_event_names[config];
112 return "unknown-hardware"; 112 return "unknown-hardware";
113 113
@@ -136,7 +136,7 @@ char *event_name(int counter)
136 } 136 }
137 137
138 case PERF_TYPE_SOFTWARE: 138 case PERF_TYPE_SOFTWARE:
139 if (config < PERF_SW_EVENTS_MAX) 139 if (config < PERF_COUNT_SW_MAX)
140 return sw_event_names[config]; 140 return sw_event_names[config];
141 return "unknown-software"; 141 return "unknown-software";
142 142