trace-cmd: Fork record_trace() for the extract case
This patch inlines record_trace() into trace_extract() by removing the code not
related to extract, by replacing IS_EXTRACT(ctx) with true and then removing the
dead code, as well as the if statements when their condition always evalutates
to true. The opposite change [IS_EXTRACT(ctx) evaluated as false] has been
applyed to record_trace().
The purpose of doing that is to reduce the amount of branches in both the cases
(extract and everything else), making the code simpler to understand and follow
but at the price of having some copy-pasted code.
Link: http://lkml.kernel.org/r/20171130131957.21617-11-vladislav.valtchev@gmail.com
Signed-off-by: Vladislav Valtchev (VMware) <vladislav.valtchev@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 file changed