From: Oleg Nesterov <oleg@redhat.com>
To: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2 v3] tracing/uprobes: Support ftrace_event_file base multibuffer
Date: Tue, 25 Jun 2013 22:24:05 +0200 [thread overview]
Message-ID: <20130625202405.GA16143@redhat.com> (raw)
In-Reply-To: <51C90ECC.9030303@huawei.com>
Sorry again, didn't have time to review, will try tomorrow.
Looks good but a couple of minor nits, and perhaps we should
fix the bugs with unregister_trace_uprobe first... in kprobes
too _if_ I am right. I'll return tomorrow.
On 06/25, zhangwei(Jovi) wrote:
>
> -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;
Cosmetic again, "int enabled = 0" and then "if (is_trace_uprobe_enabled)"
looks a bit strange,
enabled = is_trace_uprobe_enabled();
looks a bit more clean.
> + 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);
I agree with Masami, list_add_rcu_tail() looks better even if this
doesn't really matter.
Oleg.
next prev parent reply other threads:[~2013-06-25 20:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 3:30 [PATCH 1/2 v3] tracing/uprobes: Support ftrace_event_file base multibuffer zhangwei(Jovi)
2013-06-25 10:18 ` Masami Hiramatsu
2013-06-25 20:24 ` Oleg Nesterov [this message]
2013-06-27 12:12 ` Srikar Dronamraju
2013-06-27 16:27 ` Oleg Nesterov
2013-06-28 4:17 ` Masami Hiramatsu
2013-06-28 5:56 ` Masami Hiramatsu
2013-06-28 13:04 ` [PATCH] tracing/kprobe: Recover old array if fails to enable kprobe Masami Hiramatsu
2013-06-28 14:27 ` Oleg Nesterov
2013-06-28 14:43 ` Steven Rostedt
2013-06-28 18:43 ` Oleg Nesterov
2013-06-30 7:46 ` Masami Hiramatsu
2013-07-02 23:02 ` Steven Rostedt
2013-07-03 2:10 ` Masami Hiramatsu
2013-06-28 11:51 ` [PATCH 1/2 v3] tracing/uprobes: Support ftrace_event_file base multibuffer Steven Rostedt
2013-06-28 12:14 ` Masami Hiramatsu
2013-06-28 10:59 ` zhangwei(Jovi)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130625202405.GA16143@redhat.com \
--to=oleg@redhat.com \
--cc=fweisbec@gmail.com \
--cc=jovi.zhangwei@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).