]> git.baikalelectronics.ru Git - kernel.git/commit
function_graph: Have selftest also emulate tr->reset() as it did with tr->init()
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Sun, 21 Apr 2019 23:40:44 +0000 (19:40 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sun, 21 Apr 2019 23:46:56 +0000 (19:46 -0400)
commitc74dda0493eb033f5b2a8a8a7dfe77f6e5a856f9
treef4018df08575ea04b9a2aa917e1518655745a35e
parent1728a5c33e3434ccdcf141e7dc37e84f400515a4
function_graph: Have selftest also emulate tr->reset() as it did with tr->init()

The function_graph boot up self test emulates the tr->init() function in
order to add a wrapper around the function graph tracer entry code to test
for lock ups and such. But it does not emulate the tr->reset(), and just
calls the function_graph tracer tr->reset() function which will use its own
fgraph_ops to unregister function tracing with. As the fgraph_ops is
becoming more meaningful with the register_ftrace_graph() and
unregister_ftrace_graph() functions, the two need to be the same. The
emulated tr->init() uses its own fgraph_ops descriptor, which means the
unregister_ftrace_graph() must use the same ftrace_ops, which the selftest
currently does not do. By emulating the tr->reset() as the selftest does
with the tr->init() it will be able to pass the same fgraph_ops descriptor
to the unregister_ftrace_graph() as it did with the register_ftrace_graph().

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_selftest.c