summaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware)2017-03-30 04:45:18 +0200
committerSteven Rostedt (VMware)2017-04-01 00:00:45 +0200
commit5bd84629a7a0e2462c28ca52e213ebe27fadfee8 (patch)
tree9fef370dae724a4822358278d0591ba5da1c3a4f /init/main.c
parentftrace: Update func_pos in t_start() when all functions are enabled (diff)
downloadkernel-qcow2-linux-5bd84629a7a0e2462c28ca52e213ebe27fadfee8.tar.gz
kernel-qcow2-linux-5bd84629a7a0e2462c28ca52e213ebe27fadfee8.tar.xz
kernel-qcow2-linux-5bd84629a7a0e2462c28ca52e213ebe27fadfee8.zip
ftrace: Create separate t_func_next() to simplify the function / hash logic
I noticed that if I use dd to read the set_ftrace_filter file that the first hash command is repeated. # cd /sys/kernel/debug/tracing # echo schedule > set_ftrace_filter # echo do_IRQ >> set_ftrace_filter # echo schedule:traceoff >> set_ftrace_filter # echo do_IRQ:traceoff >> set_ftrace_filter # cat set_ftrace_filter schedule do_IRQ schedule:traceoff:unlimited do_IRQ:traceoff:unlimited # dd if=set_ftrace_filter bs=1 schedule do_IRQ schedule:traceoff:unlimited schedule:traceoff:unlimited do_IRQ:traceoff:unlimited 98+0 records in 98+0 records out 98 bytes copied, 0.00265011 s, 37.0 kB/s This is due to the way t_start() calls t_next() as well as the seq_file calls t_next() and the state is slightly different between the two. Namely, t_start() will call t_next() with a local "pos" variable. By separating out the function listing from t_next() into its own function, we can have better control of outputting the functions and the hash of triggers. This simplifies the code. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'init/main.c')
0 files changed, 0 insertions, 0 deletions