Re: [PATCHv10 2.6.35-rc6-tip 8/14] trace: Extract out common codefor kprobes/uprobes traceevents.

From: Masami Hiramatsu
Date: Tue Jul 27 2010 - 09:23:08 EST


Hi Srikar,

Srikar Dronamraju wrote:
> Move common parts of trace_kprobe.c and trace_uprobe.c
> Adjust kernel/trace/trace_kprobe.c after moving common code to
> kernel/trace/trace_probe.h and kernel/trace/trace_probe.c.
>
> TODO: Merge both events to a single probe event.
>
> Signed-off-by: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx>
> ---
[...]
> +/* Recursive argument parser */
> +static int parse_probe_arg(char *arg, const struct fetch_type *t,
> + struct fetch_param *f, int is_return, bool is_kprobe)

If you use "bool" for "is_kprobe", change "is_return" type too.

And, maybe you missed that the fetch function supports "string" type now,
which needs a bit different manner for storing fetched value. You can find
store_trace_args() function in trace_kprobe.c.

BTW, current fetch functions doesn't support fetching "paged-out" user-variables
because kprobe can't sleep inside its handler.
However, user-space memory can be paged out, and I assume that uprobes allows
its handler to I/O (and yield). If so, it can wait for accessing paged-out
variable, can't it?

Thank you,

--
Masami HIRAMATSU
2nd Research Dept.
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@xxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/