tracing/kprobes: remove unnecessary checking of, trace_probe_is_enabled
PATCH 1/1 tracing/kprobes: remove unnecessary checking of, trace_probe_is_enabled
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.
Remove the unnecessary checking.
Signed-off-by zhangwei(Jovi) <[email protected]>
Cc Masami Hiramatsu <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Srikar Dronamraju <[email protected]>
--- kernel/trace/trace_kprobe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/trace/trace_kprobe.c +1 -2
@@ -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
Signature · 1 line
1.7.9.7
Quoted 3 lines · zhangwei(Jovi)
Since
tp->flagsassignment was moved into functionenable_trace_probe, so there have no need to usetrace_probe_is_enabledto check flags in same function.
Indeed :)
Quoted 2 lines
Remove the unnecessary checking.
Acked-by Masami Hiramatsu <[email protected]>
Quoted 25 lines
Signed-off-by zhangwei(Jovi) <[email protected]>Cc Masami Hiramatsu <[email protected]>Cc Frederic Weisbecker <[email protected]>Cc Oleg Nesterov <[email protected]>Cc Srikar Dronamraju <[email protected]>--- kernel/trace/trace_kprobe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)kernel/trace/trace_kprobe.c +1
-2@@ -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
Signature · 4 lines
Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: [email protected]
Steven Rostedt
maintainerQuoted 5 lines · Masami Hiramatsu
Quoted 3 lines · zhangwei(Jovi)
Since
tp->flagsassignment was moved into functionenable_trace_probe, so there have no need to usetrace_probe_is_enabledto check flags in same function.
Quoted 8 lines
Indeed :)
Quoted 2 lines
Remove the unnecessary checking.
Acked-by Masami Hiramatsu <[email protected]>
Thanks, I added this to my 3.11 queue.
-- Steve