| Date | Tue, 27 Jul 2010 22:22:53 +0900 | From | Masami Hiramatsu <> | Subject | Re: [PATCHv10 2.6.35-rc6-tip 8/14] trace: Extract out common code for kprobes/uprobes traceevents. |
| |
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@linux.vnet.ibm.com> > --- [...] > +/* 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@hitachi.com
|