Messages in this thread | | | Date | Tue, 25 Jun 2013 19:18:57 +0900 | From | Masami Hiramatsu <> | Subject | Re: [PATCH 1/2 v3] tracing/uprobes: Support ftrace_event_file base multibuffer |
| |
(2013/06/25 12:30), zhangwei(Jovi) wrote: > @@ -605,33 +629,84 @@ typedef bool (*filter_func_t)(struct uprobe_consumer *self, > struct mm_struct *mm); > > static int > -probe_event_enable(struct trace_uprobe *tu, int flag, filter_func_t filter) > +probe_event_enable(struct trace_uprobe *tu, struct ftrace_event_file *file, > + filter_func_t filter) > { > + int enabled = 0; > int ret = 0; > > + /* we cannot call uprobe_register twice for same tu */ > if (is_trace_uprobe_enabled(tu)) > - return -EINTR; > + enabled = 1; > + > + if (file) { > + struct event_file_link *link; > + > + if (tu->flags & TP_FLAG_PROFILE) > + return -EINTR; > + > + link = kmalloc(sizeof(*link), GFP_KERNEL); > + if (!link) > + return -ENOMEM; > + > + link->file = file; > + list_add_rcu(&link->list, &tu->files);
Maybe, list_add_tail_rcu() ? :) (but this is a minor one)
Other parts looks good for me.
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Thank you,
-- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com
| |