diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-11-09 03:37:34 -0500 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-11-10 05:10:08 -0500 |
commit | 676c0dbe6e514fdd8e434a9e623c781aa9b40b15 (patch) | |
tree | 1bfd6517d6dcfb952c7e4b083950506971e923a4 /kernel/trace/trace_ksym.c | |
parent | 30ff21e31fe5c8b7b1b7d30cc41e32bc4ee9f175 (diff) |
ksym_tracer: Support read accesses independent of read/write.
All of the infrastructure already exists to support read accesses
for platforms that support a read access independently of read/write
(such as in the case of the SuperH UBC). This just trivially hooks
up the read case by itself.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jan Kiszka <jan.kiszka@web.de>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
LKML-Reference: <20091109083733.GA25848@linux-sh.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace/trace_ksym.c')
-rw-r--r-- | kernel/trace/trace_ksym.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/trace/trace_ksym.c b/kernel/trace/trace_ksym.c index fea83eeeef09..11935b53a6cb 100644 --- a/kernel/trace/trace_ksym.c +++ b/kernel/trace/trace_ksym.c | |||
@@ -136,6 +136,7 @@ static int ksym_trace_get_access_type(char *str) | |||
136 | access |= HW_BREAKPOINT_X; | 136 | access |= HW_BREAKPOINT_X; |
137 | 137 | ||
138 | switch (access) { | 138 | switch (access) { |
139 | case HW_BREAKPOINT_R: | ||
139 | case HW_BREAKPOINT_W: | 140 | case HW_BREAKPOINT_W: |
140 | case HW_BREAKPOINT_W | HW_BREAKPOINT_R: | 141 | case HW_BREAKPOINT_W | HW_BREAKPOINT_R: |
141 | return access; | 142 | return access; |
@@ -239,7 +240,9 @@ static ssize_t ksym_trace_filter_read(struct file *filp, char __user *ubuf, | |||
239 | 240 | ||
240 | hlist_for_each_entry(entry, node, &ksym_filter_head, ksym_hlist) { | 241 | hlist_for_each_entry(entry, node, &ksym_filter_head, ksym_hlist) { |
241 | ret = trace_seq_printf(s, "%pS:", (void *)entry->ksym_addr); | 242 | ret = trace_seq_printf(s, "%pS:", (void *)entry->ksym_addr); |
242 | if (entry->type == HW_BREAKPOINT_W) | 243 | if (entry->type == HW_BREAKPOINT_R) |
244 | ret = trace_seq_puts(s, "r--\n"); | ||
245 | else if (entry->type == HW_BREAKPOINT_W) | ||
243 | ret = trace_seq_puts(s, "-w-\n"); | 246 | ret = trace_seq_puts(s, "-w-\n"); |
244 | else if (entry->type == (HW_BREAKPOINT_W | HW_BREAKPOINT_R)) | 247 | else if (entry->type == (HW_BREAKPOINT_W | HW_BREAKPOINT_R)) |
245 | ret = trace_seq_puts(s, "rw-\n"); | 248 | ret = trace_seq_puts(s, "rw-\n"); |
@@ -414,6 +417,9 @@ static enum print_line_t ksym_trace_output(struct trace_iterator *iter) | |||
414 | return TRACE_TYPE_PARTIAL_LINE; | 417 | return TRACE_TYPE_PARTIAL_LINE; |
415 | 418 | ||
416 | switch (field->type) { | 419 | switch (field->type) { |
420 | case HW_BREAKPOINT_R: | ||
421 | ret = trace_seq_printf(s, " R "); | ||
422 | break; | ||
417 | case HW_BREAKPOINT_W: | 423 | case HW_BREAKPOINT_W: |
418 | ret = trace_seq_printf(s, " W "); | 424 | ret = trace_seq_printf(s, " W "); |
419 | break; | 425 | break; |
@@ -488,6 +494,9 @@ static int ksym_tracer_stat_show(struct seq_file *m, void *v) | |||
488 | access_type = entry->type; | 494 | access_type = entry->type; |
489 | 495 | ||
490 | switch (access_type) { | 496 | switch (access_type) { |
497 | case HW_BREAKPOINT_R: | ||
498 | seq_puts(m, " R "); | ||
499 | break; | ||
491 | case HW_BREAKPOINT_W: | 500 | case HW_BREAKPOINT_W: |
492 | seq_puts(m, " W "); | 501 | seq_puts(m, " W "); |
493 | break; | 502 | break; |