[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54662133.4060405@hitachi.com>
Date: Sat, 15 Nov 2014 00:35:15 +0900
From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jiri Kosina <jkosina@...e.cz>, Petr Mladek <pmladek@...e.cz>,
Namhyung Kim <namhyung@...nel.org>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Subject: Re: [RFC][PATCH 10/23 v4] tracing/uprobes: Do not use return values
of trace_seq_printf()
(2014/11/14 10:12), Steven Rostedt wrote:
> From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
>
> The functions trace_seq_printf() and friends will soon no longer have
> return values. Using trace_seq_has_overflowed() and trace_handle_return()
> should be used instead.
>
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
> ---
> kernel/trace/trace_uprobe.c | 23 +++++++++--------------
> 1 file changed, 9 insertions(+), 14 deletions(-)
>
> diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
> index 33ff6a24b802..bd6007b13b52 100644
> --- a/kernel/trace/trace_uprobe.c
> +++ b/kernel/trace/trace_uprobe.c
> @@ -852,31 +852,26 @@ print_uprobe_event(struct trace_iterator *iter, int flags, struct trace_event *e
> tu = container_of(event, struct trace_uprobe, tp.call.event);
>
> if (is_ret_probe(tu)) {
> - if (!trace_seq_printf(s, "%s: (0x%lx <- 0x%lx)",
> - ftrace_event_name(&tu->tp.call),
> - entry->vaddr[1], entry->vaddr[0]))
> - goto partial;
> + trace_seq_printf(s, "%s: (0x%lx <- 0x%lx)",
> + ftrace_event_name(&tu->tp.call),
> + entry->vaddr[1], entry->vaddr[0]);
> data = DATAOF_TRACE_ENTRY(entry, true);
> } else {
> - if (!trace_seq_printf(s, "%s: (0x%lx)",
> - ftrace_event_name(&tu->tp.call),
> - entry->vaddr[0]))
> - goto partial;
> + trace_seq_printf(s, "%s: (0x%lx)",
> + ftrace_event_name(&tu->tp.call),
> + entry->vaddr[0]);
> data = DATAOF_TRACE_ENTRY(entry, false);
> }
>
> for (i = 0; i < tu->tp.nr_args; i++) {
> struct probe_arg *parg = &tu->tp.args[i];
>
> - if (!parg->type->print(s, parg->name, data + parg->offset, entry))
> - goto partial;
> + parg->type->print(s, parg->name, data + parg->offset, entry);
In 7/23 you've left loop canceling path, why don't you do same thing here?
Thank you,
> }
>
> - if (trace_seq_puts(s, "\n"))
> - return TRACE_TYPE_HANDLED;
> + trace_seq_puts(s, "\n");
>
> -partial:
> - return TRACE_TYPE_PARTIAL_LINE;
> + return trace_handle_return(s);
> }
>
> typedef bool (*filter_func_t)(struct uprobe_consumer *self,
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research 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