aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorJaswinder Singh Rajput <jaswinder@kernel.org>2009-06-22 11:17:26 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-22 11:25:53 -0400
commitc0c22dbfa8ba3c5045eeb9c76d2822ffc44fefc3 (patch)
tree036d5f39f6c6d39b0e28144a319d4d7c2da2ee80 /tools/perf
parent520f2c346af463fa00924b236e092da482b344cc (diff)
perf_counter tools: Set alias for page-faults
"faults" should be alias for "page-faults" Also fixed alignment and 80 characters issue Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <1245683846.12092.1.camel@localhost.localdomain> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/parse-events.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index f5695486ad3f..06af2fadcd87 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -33,8 +33,7 @@ static struct event_symbol event_symbols[] = {
33 33
34 { CSW(CPU_CLOCK), "cpu-clock", "" }, 34 { CSW(CPU_CLOCK), "cpu-clock", "" },
35 { CSW(TASK_CLOCK), "task-clock", "" }, 35 { CSW(TASK_CLOCK), "task-clock", "" },
36 { CSW(PAGE_FAULTS), "page-faults", "" }, 36 { CSW(PAGE_FAULTS), "page-faults", "faults" },
37 { CSW(PAGE_FAULTS), "faults", "" },
38 { CSW(PAGE_FAULTS_MIN), "minor-faults", "" }, 37 { CSW(PAGE_FAULTS_MIN), "minor-faults", "" },
39 { CSW(PAGE_FAULTS_MAJ), "major-faults", "" }, 38 { CSW(PAGE_FAULTS_MAJ), "major-faults", "" },
40 { CSW(CONTEXT_SWITCHES), "context-switches", "cs" }, 39 { CSW(CONTEXT_SWITCHES), "context-switches", "cs" },
@@ -71,24 +70,24 @@ static char *sw_event_names[] = {
71 70
72#define MAX_ALIASES 8 71#define MAX_ALIASES 8
73 72
74static char *hw_cache [][MAX_ALIASES] = { 73static char *hw_cache[][MAX_ALIASES] = {
75 { "L1-data" , "l1-d", "l1d" }, 74 { "L1-data", "l1-d", "l1d" },
76 { "L1-instruction" , "l1-i", "l1i" }, 75 { "L1-instruction", "l1-i", "l1i" },
77 { "L2" , "l2" }, 76 { "L2", "l2" },
78 { "Data-TLB" , "dtlb", "d-tlb" }, 77 { "Data-TLB", "dtlb", "d-tlb" },
79 { "Instruction-TLB" , "itlb", "i-tlb" }, 78 { "Instruction-TLB", "itlb", "i-tlb" },
80 { "Branch" , "bpu" , "btb", "bpc" }, 79 { "Branch", "bpu" , "btb", "bpc" },
81}; 80};
82 81
83static char *hw_cache_op [][MAX_ALIASES] = { 82static char *hw_cache_op[][MAX_ALIASES] = {
84 { "Load" , "read" }, 83 { "Load", "read" },
85 { "Store" , "write" }, 84 { "Store", "write" },
86 { "Prefetch" , "speculative-read", "speculative-load" }, 85 { "Prefetch", "speculative-read", "speculative-load" },
87}; 86};
88 87
89static char *hw_cache_result [][MAX_ALIASES] = { 88static char *hw_cache_result[][MAX_ALIASES] = {
90 { "Reference" , "ops", "access" }, 89 { "Reference", "ops", "access" },
91 { "Miss" }, 90 { "Miss" },
92}; 91};
93 92
94char *event_name(int counter) 93char *event_name(int counter)
@@ -160,7 +159,8 @@ static int parse_aliases(const char *str, char *names[][MAX_ALIASES], int size)
160 return -1; 159 return -1;
161} 160}
162 161
163static int parse_generic_hw_symbols(const char *str, struct perf_counter_attr *attr) 162static int
163parse_generic_hw_symbols(const char *str, struct perf_counter_attr *attr)
164{ 164{
165 int cache_type = -1, cache_op = 0, cache_result = 0; 165 int cache_type = -1, cache_op = 0, cache_result = 0;
166 166
@@ -201,7 +201,7 @@ static int check_events(const char *str, unsigned int i)
201 201
202 if (strlen(event_symbols[i].alias)) 202 if (strlen(event_symbols[i].alias))
203 if (!strncmp(str, event_symbols[i].alias, 203 if (!strncmp(str, event_symbols[i].alias,
204 strlen(event_symbols[i].alias))) 204 strlen(event_symbols[i].alias)))
205 return 1; 205 return 1;
206 return 0; 206 return 0;
207} 207}