• Jiri Olsa's avatar
    ftrace: Add enable/disable ftrace_ops control interface · e248491a
    Jiri Olsa authored
    Adding a way to temporarily enable/disable ftrace_ops. The change
    follows the same way as 'global' ftrace_ops are done.
    Introducing 2 global ftrace_ops - control_ops and ftrace_control_list
    which take over all ftrace_ops registered with FTRACE_OPS_FL_CONTROL
    flag. In addition new per cpu flag called 'disabled' is also added to
    ftrace_ops to provide the control information for each cpu.
    When ftrace_ops with FTRACE_OPS_FL_CONTROL is registered, it is
    set as disabled for all cpus.
    The ftrace_control_list contains all the registered 'control' ftrace_ops.
    The control_ops provides function which iterates ftrace_control_list
    and does the check for 'disabled' flag on current cpu.
    Adding 3 inline functions:
      - enable/disable the ftrace_ops on current cpu
      - get disabled ftrace_ops::disabled value for current cpu
    Link: http://lkml.kernel.org/r/1329317514-8131-2-git-send-email-jolsa@redhat.com
    Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>