From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Oleg Nesterov <oleg@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"yrl.pp-manager.tt@hitachi.com" <yrl.pp-manager.tt@hitachi.com>
Subject: Re: [PATCH] tracing/kprobes: remove unnecessary checking of, trace_probe_is_enabled
Date: Fri, 14 Jun 2013 12:02:51 +0900 [thread overview]
Message-ID: <51BA87DB.1020403@hitachi.com> (raw)
In-Reply-To: <51BA7B9E.3040807@huawei.com>
(2013/06/14 11:10), zhangwei(Jovi) wrote:
> Since tp->flags assignment was moved into function enable_trace_probe,
> so there have no need to use trace_probe_is_enabled to check flags
> in same function.
Indeed :)
>
> Remove the unnecessary checking.
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
>
> Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> ---
> kernel/trace/trace_kprobe.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> index 9f46e98..f237417 100644
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -240,8 +240,7 @@ enable_trace_probe(struct trace_probe *tp, struct ftrace_event_file *file)
> } else
> tp->flags |= TP_FLAG_PROFILE;
>
> - if (trace_probe_is_enabled(tp) && trace_probe_is_registered(tp) &&
> - !trace_probe_has_gone(tp)) {
> + if (trace_probe_is_registered(tp) && !trace_probe_has_gone(tp)) {
> if (trace_probe_is_return(tp))
> ret = enable_kretprobe(&tp->rp);
> else
>
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2013-06-14 3:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 2:10 [PATCH] tracing/kprobes: remove unnecessary checking of, trace_probe_is_enabled zhangwei(Jovi)
2013-06-14 3:02 ` Masami Hiramatsu [this message]
2013-06-17 16:53 ` Steven Rostedt
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=51BA87DB.1020403@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=fweisbec@gmail.com \
--cc=jovi.zhangwei@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=yrl.pp-manager.tt@hitachi.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