Re: [PATCH 1/2] tracing: make tracer_flags use the right set_flag callback

From: Steven Rostedt
Date: Tue Mar 08 2016 - 09:54:57 EST

On Tue, 8 Mar 2016 21:37:01 +0800
Chunyu Hu <chuhu@xxxxxxxxxx> wrote:

> But after some tests, find it's not easy to setup tracer flag when
> its target is not the current tracer. Some check logic of function
> and function_graph trace seems not appropriate now, some WARN in
> ftrace.c are triggered.
> kernel: WARNING: CPU: 2 PID: 5522 at kernel/trace/ftrace.c:5106 ftrace_init_array_ops+0x4a/0x70()
> kernel: WARNING: CPU: 2 PID: 5522 at kernel/trace/ftrace.c:413 ftrace_startup+0x229/0x240()
> kernel: WARNING: CPU: 2 PID: 30451 at kernel/trace/ftrace.c:460 return_to_handler+0x0/0x27()
> Here just forbit it return an invalid code to user space with extra
> dmesg help info to avoid the complex WARN log.

This is not acceptable. The whole point of making the options visible
when the tracer is not active was to change the flags when the tracer
is not active.

I'll look deeper into this. Thanks.

-- Steve