[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E82AAC5.9080105@hitachi.com>
Date: Wed, 28 Sep 2011 14:04:05 +0900
From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...e.hu>,
Steven Rostedt <rostedt@...dmis.org>,
Linux-mm <linux-mm@...ck.org>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andi Kleen <andi@...stfloor.org>,
Hugh Dickins <hughd@...gle.com>,
Christoph Hellwig <hch@...radead.org>,
Jonathan Corbet <corbet@....net>,
Thomas Gleixner <tglx@...utronix.de>,
Oleg Nesterov <oleg@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
Jim Keniston <jkenisto@...ux.vnet.ibm.com>,
Roland McGrath <roland@...k.frob.com>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v5 3.1.0-rc4-tip 19/26] tracing: Extract out common
code for kprobes/uprobes traceevents.
(2011/09/20 21:03), Srikar Dronamraju wrote:
> Move parts of trace_kprobe.c that can be shared with upcoming
> trace_uprobe.c. Common code to kernel/trace/trace_probe.h and
> kernel/trace/trace_probe.c.
This seems including different changes (as below). Please separate it.
(Maybe "Use Boolean instead of integer" patch? :))
[...]
> @@ -651,7 +107,7 @@ static struct trace_probe *alloc_trace_probe(const char *group,
> void *addr,
> const char *symbol,
> unsigned long offs,
> - int nargs, int is_return)
> + int nargs, bool is_return)
> {
> struct trace_probe *tp;
> int ret = -ENOMEM;
[...]
> @@ -1153,7 +366,7 @@ static int create_trace_probe(int argc, char **argv)
> */
> struct trace_probe *tp;
> int i, ret = 0;
> - int is_return = 0, is_delete = 0;
> + bool is_return = false, is_delete = false;
> char *symbol = NULL, *event = NULL, *group = NULL;
> char *arg;
> unsigned long offset = 0;
> @@ -1162,11 +375,11 @@ static int create_trace_probe(int argc, char **argv)
>
> /* argc must be >= 1 */
> if (argv[0][0] == 'p')
> - is_return = 0;
> + is_return = false;
> else if (argv[0][0] == 'r')
> - is_return = 1;
> + is_return = true;
> else if (argv[0][0] == '-')
> - is_delete = 1;
> + is_delete = true;
> else {
> pr_info("Probe definition must be started with 'p', 'r' or"
> " '-'.\n");
And also, this has bugs in selftest code.
[...]
> @@ -2020,7 +1166,7 @@ static __init int kprobe_trace_self_tests_init(void)
>
> pr_info("Testing kprobe tracing: ");
>
> - ret = command_trace_probe("p:testprobe kprobe_trace_selftest_target "
> + ret = traceprobe_command("p:testprobe kprobe_trace_selftest_target "
> "$stack $stack0 +0($stack)");
> if (WARN_ON_ONCE(ret)) {
> pr_warning("error on probing function entry.\n");
> @@ -2035,7 +1181,7 @@ static __init int kprobe_trace_self_tests_init(void)
> enable_trace_probe(tp, TP_FLAG_TRACE);
> }
>
> - ret = command_trace_probe("r:testprobe2 kprobe_trace_selftest_target "
> + ret = traceprobe_command("r:testprobe2 kprobe_trace_selftest_target "
> "$retval");
> if (WARN_ON_ONCE(ret)) {
> pr_warning("error on probing function return.\n");
> @@ -2055,13 +1201,13 @@ static __init int kprobe_trace_self_tests_init(void)
>
> ret = target(1, 2, 3, 4, 5, 6);
>
> - ret = command_trace_probe("-:testprobe");
> + ret = traceprobe_command_trace_probe("-:testprobe");
> if (WARN_ON_ONCE(ret)) {
> pr_warning("error on deleting a probe.\n");
> warn++;
> }
>
> - ret = command_trace_probe("-:testprobe2");
> + ret = traceprobe_command_trace_probe("-:testprobe2");
> if (WARN_ON_ONCE(ret)) {
> pr_warning("error on deleting a probe.\n");
> warn++;
traceprobe_command(str) and traceprobe_command_trace_probe(str) should be
traceprobe_command(str, create_trace_probe).
Thank you,
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists