* [PATCH -tip] ksym_tracer: Support read accesses independent of read/write.
@ 2009-11-09 8:37 Paul Mundt
2009-11-09 18:04 ` Frederic Weisbecker
2009-11-21 13:38 ` [tip:perf/core] " tip-bot for Paul Mundt
0 siblings, 2 replies; 3+ messages in thread
From: Paul Mundt @ 2009-11-09 8:37 UTC (permalink / raw)
To: Frederic Weisbecker
Cc: Ingo Molnar, Li Zefan, Prasad, Alan Stern, Peter Zijlstra,
Arnaldo Carvalho de Melo, Steven Rostedt, Jan Kiszka, Jiri Slaby,
Avi Kivity, Paul Mackerras, Mike Galbraith, Masami Hiramatsu,
Arjan van de Ven, linux-kernel
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>
---
Applies on top of v6 of the hw-breakpoints perf event rewrite (and
tracing/hw-breakpoints in -tip as of this moment).
kernel/trace/trace_ksym.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_ksym.c b/kernel/trace/trace_ksym.c
index fea83ee..11935b5 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)
access |= HW_BREAKPOINT_X;
switch (access) {
+ case HW_BREAKPOINT_R:
case HW_BREAKPOINT_W:
case HW_BREAKPOINT_W | HW_BREAKPOINT_R:
return access;
@@ -239,7 +240,9 @@ static ssize_t ksym_trace_filter_read(struct file *filp, char __user *ubuf,
hlist_for_each_entry(entry, node, &ksym_filter_head, ksym_hlist) {
ret = trace_seq_printf(s, "%pS:", (void *)entry->ksym_addr);
- if (entry->type == HW_BREAKPOINT_W)
+ if (entry->type == HW_BREAKPOINT_R)
+ ret = trace_seq_puts(s, "r--\n");
+ else if (entry->type == HW_BREAKPOINT_W)
ret = trace_seq_puts(s, "-w-\n");
else if (entry->type == (HW_BREAKPOINT_W | HW_BREAKPOINT_R))
ret = trace_seq_puts(s, "rw-\n");
@@ -414,6 +417,9 @@ static enum print_line_t ksym_trace_output(struct trace_iterator *iter)
return TRACE_TYPE_PARTIAL_LINE;
switch (field->type) {
+ case HW_BREAKPOINT_R:
+ ret = trace_seq_printf(s, " R ");
+ break;
case HW_BREAKPOINT_W:
ret = trace_seq_printf(s, " W ");
break;
@@ -488,6 +494,9 @@ static int ksym_tracer_stat_show(struct seq_file *m, void *v)
access_type = entry->type;
switch (access_type) {
+ case HW_BREAKPOINT_R:
+ seq_puts(m, " R ");
+ break;
case HW_BREAKPOINT_W:
seq_puts(m, " W ");
break;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -tip] ksym_tracer: Support read accesses independent of read/write.
2009-11-09 8:37 [PATCH -tip] ksym_tracer: Support read accesses independent of read/write Paul Mundt
@ 2009-11-09 18:04 ` Frederic Weisbecker
2009-11-21 13:38 ` [tip:perf/core] " tip-bot for Paul Mundt
1 sibling, 0 replies; 3+ messages in thread
From: Frederic Weisbecker @ 2009-11-09 18:04 UTC (permalink / raw)
To: Paul Mundt
Cc: Ingo Molnar, Li Zefan, Prasad, Alan Stern, Peter Zijlstra,
Arnaldo Carvalho de Melo, Steven Rostedt, Jan Kiszka, Jiri Slaby,
Avi Kivity, Paul Mackerras, Mike Galbraith, Masami Hiramatsu,
Arjan van de Ven, linux-kernel
On Mon, Nov 09, 2009 at 05:37:34PM +0900, Paul Mundt wrote:
> 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>
>
Queued, thanks Paul.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:perf/core] ksym_tracer: Support read accesses independent of read/write.
2009-11-09 8:37 [PATCH -tip] ksym_tracer: Support read accesses independent of read/write Paul Mundt
2009-11-09 18:04 ` Frederic Weisbecker
@ 2009-11-21 13:38 ` tip-bot for Paul Mundt
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Paul Mundt @ 2009-11-21 13:38 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, mingo, stern, efault, peterz, jirislaby, fweisbec, rostedt,
tglx, mhiramat, linux-kernel, hpa, paulus, arjan, lizf,
jan.kiszka, lethal, prasad, mingo, avi
Commit-ID: 676c0dbe6e514fdd8e434a9e623c781aa9b40b15
Gitweb: http://git.kernel.org/tip/676c0dbe6e514fdd8e434a9e623c781aa9b40b15
Author: Paul Mundt <lethal@linux-sh.org>
AuthorDate: Mon, 9 Nov 2009 17:37:34 +0900
Committer: Frederic Weisbecker <fweisbec@gmail.com>
CommitDate: Tue, 10 Nov 2009 11:10:08 +0100
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>
---
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 fea83ee..11935b5 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)
access |= HW_BREAKPOINT_X;
switch (access) {
+ case HW_BREAKPOINT_R:
case HW_BREAKPOINT_W:
case HW_BREAKPOINT_W | HW_BREAKPOINT_R:
return access;
@@ -239,7 +240,9 @@ static ssize_t ksym_trace_filter_read(struct file *filp, char __user *ubuf,
hlist_for_each_entry(entry, node, &ksym_filter_head, ksym_hlist) {
ret = trace_seq_printf(s, "%pS:", (void *)entry->ksym_addr);
- if (entry->type == HW_BREAKPOINT_W)
+ if (entry->type == HW_BREAKPOINT_R)
+ ret = trace_seq_puts(s, "r--\n");
+ else if (entry->type == HW_BREAKPOINT_W)
ret = trace_seq_puts(s, "-w-\n");
else if (entry->type == (HW_BREAKPOINT_W | HW_BREAKPOINT_R))
ret = trace_seq_puts(s, "rw-\n");
@@ -414,6 +417,9 @@ static enum print_line_t ksym_trace_output(struct trace_iterator *iter)
return TRACE_TYPE_PARTIAL_LINE;
switch (field->type) {
+ case HW_BREAKPOINT_R:
+ ret = trace_seq_printf(s, " R ");
+ break;
case HW_BREAKPOINT_W:
ret = trace_seq_printf(s, " W ");
break;
@@ -488,6 +494,9 @@ static int ksym_tracer_stat_show(struct seq_file *m, void *v)
access_type = entry->type;
switch (access_type) {
+ case HW_BREAKPOINT_R:
+ seq_puts(m, " R ");
+ break;
case HW_BREAKPOINT_W:
seq_puts(m, " W ");
break;
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-21 13:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-09 8:37 [PATCH -tip] ksym_tracer: Support read accesses independent of read/write Paul Mundt
2009-11-09 18:04 ` Frederic Weisbecker
2009-11-21 13:38 ` [tip:perf/core] " tip-bot for Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox