diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2009-08-21 15:43:51 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-26 20:32:59 -0400 |
commit | 30a7e073b590ebd1829a906164b0a637e77cc967 (patch) | |
tree | d31b26e5f650dd4bf883c2b7b9bf22116b769b83 /kernel/trace/trace_kprobe.c | |
parent | 38a47497d9e34632abbeb484603cedf10c4b05e4 (diff) |
tracing/kprobes: Change trace_arg to probe_arg
Change trace_arg_string() and parse_trace_arg() to probe_arg_string()
and parse_probe_arg(), since those are kprobe-tracer local functions.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jason Baron <jbaron@redhat.com>
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Przemysław Pawełczyk <przemyslaw@pawelczyk.it>
Cc: Roland McGrath <roland@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
LKML-Reference: <20090821194351.12478.15247.stgit@localhost.localdomain>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace/trace_kprobe.c')
-rw-r--r-- | kernel/trace/trace_kprobe.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 1a9ca79fe645..f4ec3fc87b2d 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c | |||
@@ -220,7 +220,7 @@ static __kprobes void *probe_address(struct trace_probe *tp) | |||
220 | return (probe_is_return(tp)) ? tp->rp.kp.addr : tp->kp.addr; | 220 | return (probe_is_return(tp)) ? tp->rp.kp.addr : tp->kp.addr; |
221 | } | 221 | } |
222 | 222 | ||
223 | static int trace_arg_string(char *buf, size_t n, struct fetch_func *ff) | 223 | static int probe_arg_string(char *buf, size_t n, struct fetch_func *ff) |
224 | { | 224 | { |
225 | int ret = -EINVAL; | 225 | int ret = -EINVAL; |
226 | 226 | ||
@@ -250,7 +250,7 @@ static int trace_arg_string(char *buf, size_t n, struct fetch_func *ff) | |||
250 | if (ret >= n) | 250 | if (ret >= n) |
251 | goto end; | 251 | goto end; |
252 | l += ret; | 252 | l += ret; |
253 | ret = trace_arg_string(buf + l, n - l, &id->orig); | 253 | ret = probe_arg_string(buf + l, n - l, &id->orig); |
254 | if (ret < 0) | 254 | if (ret < 0) |
255 | goto end; | 255 | goto end; |
256 | l += ret; | 256 | l += ret; |
@@ -408,7 +408,7 @@ static int split_symbol_offset(char *symbol, long *offset) | |||
408 | #define PARAM_MAX_ARGS 16 | 408 | #define PARAM_MAX_ARGS 16 |
409 | #define PARAM_MAX_STACK (THREAD_SIZE / sizeof(unsigned long)) | 409 | #define PARAM_MAX_STACK (THREAD_SIZE / sizeof(unsigned long)) |
410 | 410 | ||
411 | static int parse_trace_arg(char *arg, struct fetch_func *ff, int is_return) | 411 | static int parse_probe_arg(char *arg, struct fetch_func *ff, int is_return) |
412 | { | 412 | { |
413 | int ret = 0; | 413 | int ret = 0; |
414 | unsigned long param; | 414 | unsigned long param; |
@@ -499,7 +499,7 @@ static int parse_trace_arg(char *arg, struct fetch_func *ff, int is_return) | |||
499 | if (!id) | 499 | if (!id) |
500 | return -ENOMEM; | 500 | return -ENOMEM; |
501 | id->offset = offset; | 501 | id->offset = offset; |
502 | ret = parse_trace_arg(arg, &id->orig, is_return); | 502 | ret = parse_probe_arg(arg, &id->orig, is_return); |
503 | if (ret) | 503 | if (ret) |
504 | kfree(id); | 504 | kfree(id); |
505 | else { | 505 | else { |
@@ -617,7 +617,7 @@ static int create_trace_probe(int argc, char **argv) | |||
617 | ret = -ENOSPC; | 617 | ret = -ENOSPC; |
618 | goto error; | 618 | goto error; |
619 | } | 619 | } |
620 | ret = parse_trace_arg(argv[i], &tp->args[i], is_return); | 620 | ret = parse_probe_arg(argv[i], &tp->args[i], is_return); |
621 | if (ret) | 621 | if (ret) |
622 | goto error; | 622 | goto error; |
623 | } | 623 | } |
@@ -680,7 +680,7 @@ static int probes_seq_show(struct seq_file *m, void *v) | |||
680 | seq_printf(m, " 0x%p", probe_address(tp)); | 680 | seq_printf(m, " 0x%p", probe_address(tp)); |
681 | 681 | ||
682 | for (i = 0; i < tp->nr_args; i++) { | 682 | for (i = 0; i < tp->nr_args; i++) { |
683 | ret = trace_arg_string(buf, MAX_ARGSTR_LEN, &tp->args[i]); | 683 | ret = probe_arg_string(buf, MAX_ARGSTR_LEN, &tp->args[i]); |
684 | if (ret < 0) { | 684 | if (ret < 0) { |
685 | pr_warning("Argument%d decoding error(%d).\n", i, ret); | 685 | pr_warning("Argument%d decoding error(%d).\n", i, ret); |
686 | return ret; | 686 | return ret; |
@@ -997,7 +997,7 @@ static int kprobe_event_define_fields(struct ftrace_event_call *event_call) | |||
997 | sprintf(buf, "arg%d", i); | 997 | sprintf(buf, "arg%d", i); |
998 | DEFINE_FIELD(unsigned long, args[i], buf, 0); | 998 | DEFINE_FIELD(unsigned long, args[i], buf, 0); |
999 | /* Set argument string as an alias field */ | 999 | /* Set argument string as an alias field */ |
1000 | ret = trace_arg_string(buf, MAX_ARGSTR_LEN, &tp->args[i]); | 1000 | ret = probe_arg_string(buf, MAX_ARGSTR_LEN, &tp->args[i]); |
1001 | if (ret < 0) | 1001 | if (ret < 0) |
1002 | return ret; | 1002 | return ret; |
1003 | DEFINE_FIELD(unsigned long, args[i], buf, 0); | 1003 | DEFINE_FIELD(unsigned long, args[i], buf, 0); |
@@ -1024,7 +1024,7 @@ static int kretprobe_event_define_fields(struct ftrace_event_call *event_call) | |||
1024 | sprintf(buf, "arg%d", i); | 1024 | sprintf(buf, "arg%d", i); |
1025 | DEFINE_FIELD(unsigned long, args[i], buf, 0); | 1025 | DEFINE_FIELD(unsigned long, args[i], buf, 0); |
1026 | /* Set argument string as an alias field */ | 1026 | /* Set argument string as an alias field */ |
1027 | ret = trace_arg_string(buf, MAX_ARGSTR_LEN, &tp->args[i]); | 1027 | ret = probe_arg_string(buf, MAX_ARGSTR_LEN, &tp->args[i]); |
1028 | if (ret < 0) | 1028 | if (ret < 0) |
1029 | return ret; | 1029 | return ret; |
1030 | DEFINE_FIELD(unsigned long, args[i], buf, 0); | 1030 | DEFINE_FIELD(unsigned long, args[i], buf, 0); |
@@ -1041,7 +1041,7 @@ static int __probe_event_show_format(struct trace_seq *s, | |||
1041 | 1041 | ||
1042 | /* Show aliases */ | 1042 | /* Show aliases */ |
1043 | for (i = 0; i < tp->nr_args; i++) { | 1043 | for (i = 0; i < tp->nr_args; i++) { |
1044 | ret = trace_arg_string(buf, MAX_ARGSTR_LEN, &tp->args[i]); | 1044 | ret = probe_arg_string(buf, MAX_ARGSTR_LEN, &tp->args[i]); |
1045 | if (ret < 0) | 1045 | if (ret < 0) |
1046 | return ret; | 1046 | return ret; |
1047 | if (!trace_seq_printf(s, "\talias: %s;\toriginal: arg%d;\n", | 1047 | if (!trace_seq_printf(s, "\talias: %s;\toriginal: arg%d;\n", |