]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - kernel/trace/trace.c
tracing: Apply tracer specific options from kernel command line.
authorJiaxing Wang <hello.wjx@gmail.com>
Wed, 4 Nov 2015 01:14:29 +0000 (09:14 +0800)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 4 Nov 2015 02:51:43 +0000 (21:51 -0500)
commita4d1e68823033905de4f927e2e392e21a1c507e3
treeee17db784fb9fce1826f96d6ccfd32cbed30fef4
parent627645fdb657dfae5fcf26bbf6a6e1b63751dbc8
tracing: Apply tracer specific options from kernel command line.

Currently, the trace_options parameter is only applied in
tracer_alloc_buffers() when global_trace.current_trace is nop_trace,
so a tracer specific option will not be applied even when the specific
tracer is also enabled from kernel command line. For example, the
'func_stack_trace' option can't be enabled with the following kernel
parameter:

  ftrace=function ftrace_filter=kfree trace_options=func_stack_trace

We can enable tracer specific options by simply apply the options again
if the specific tracer is also supplied from command line and started
in register_tracer().

To make trace_boot_options_buf can be parsed again, a comma and a space
is put back if they were replaced by strsep and strstrip respectively.

Also make register_tracer() be __init to access the __init data, and
in fact register_tracer is only called from __init code.

Link: http://lkml.kernel.org/r/1446599669-9294-1-git-send-email-hello.wjx@gmail.com
Signed-off-by: Jiaxing Wang <hello.wjx@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c