Merge tag 'trace-v4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 29 Jan 2016 01:00:50 +0000 (17:00 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 29 Jan 2016 01:00:50 +0000 (17:00 -0800)
Pull minor tracing fixes from Steven Rostedt:
 "This includes three minor fixes, mostly due to cut-and-paste issues.

  The first is a cut and paste issue that changed the amount of stack to
  skip when tracing a stack dump from 0 to 6, which basically made the
  stack disappear for small stack traces.

  The second fix is just removing an unused field in a struct that is no
  longer used, and currently just wastes space.

  The third is another cut-and-paste fix that had a tracepoint recording
  the wrong field (it was recording the previous field a second time)"

* tag 'trace-v4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing/dma-buf/fence: Fix timeline str value on fence_annotate_wait_on
  ftrace: Remove unused nr_trampolines var
  tracing: Fix stacktrace skip depth in trace_buffer_unlock_commit_regs()

1  2 
include/linux/ftrace.h

diff --combined include/linux/ftrace.h
index 0639dcc9819523a002de1149da5629d24bce039b,65460ad93c7bc23cd61771341e145da67a1b31ea..81de7123959d96d97dd57d41d76289b3a8185920
@@@ -76,8 -76,8 +76,8 @@@ ftrace_func_t ftrace_ops_get_func(struc
   * ENABLED - set/unset when ftrace_ops is registered/unregistered
   * DYNAMIC - set when ftrace_ops is registered to denote dynamically
   *           allocated ftrace_ops which need special care
 - * CONTROL - set manualy by ftrace_ops user to denote the ftrace_ops
 - *           could be controled by following calls:
 + * PER_CPU - set manualy by ftrace_ops user to denote the ftrace_ops
 + *           could be controlled by following calls:
   *             ftrace_function_local_enable
   *             ftrace_function_local_disable
   * SAVE_REGS - The ftrace_ops wants regs saved at each function called
  enum {
        FTRACE_OPS_FL_ENABLED                   = 1 << 0,
        FTRACE_OPS_FL_DYNAMIC                   = 1 << 1,
 -      FTRACE_OPS_FL_CONTROL                   = 1 << 2,
 +      FTRACE_OPS_FL_PER_CPU                   = 1 << 2,
        FTRACE_OPS_FL_SAVE_REGS                 = 1 << 3,
        FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED    = 1 << 4,
        FTRACE_OPS_FL_RECURSION_SAFE            = 1 << 5,
        FTRACE_OPS_FL_ALLOC_TRAMP               = 1 << 12,
        FTRACE_OPS_FL_IPMODIFY                  = 1 << 13,
        FTRACE_OPS_FL_PID                       = 1 << 14,
 +      FTRACE_OPS_FL_RCU                       = 1 << 15,
  };
  
  #ifdef CONFIG_DYNAMIC_FTRACE
@@@ -147,11 -146,11 +147,11 @@@ struct ftrace_ops_hash 
  #endif
  
  /*
 - * Note, ftrace_ops can be referenced outside of RCU protection.
 - * (Although, for perf, the control ops prevent that). If ftrace_ops is
 - * allocated and not part of kernel core data, the unregistering of it will
 - * perform a scheduling on all CPUs to make sure that there are no more users.
 - * Depending on the load of the system that may take a bit of time.
 + * Note, ftrace_ops can be referenced outside of RCU protection, unless
 + * the RCU flag is set. If ftrace_ops is allocated and not part of kernel
 + * core data, the unregistering of it will perform a scheduling on all CPUs
 + * to make sure that there are no more users. Depending on the load of the
 + * system that may take a bit of time.
   *
   * Any private data added must also take care not to be freed and if private
   * data is added to a ftrace_ops that is in core code, the user of the
@@@ -165,7 -164,6 +165,6 @@@ struct ftrace_ops 
        ftrace_func_t                   saved_func;
        int __percpu                    *disabled;
  #ifdef CONFIG_DYNAMIC_FTRACE
-       int                             nr_trampolines;
        struct ftrace_ops_hash          local_hash;
        struct ftrace_ops_hash          *func_hash;
        struct ftrace_ops_hash          old_hash;
@@@ -197,34 -195,34 +196,34 @@@ int unregister_ftrace_function(struct f
  void clear_ftrace_function(void);
  
  /**
 - * ftrace_function_local_enable - enable controlled ftrace_ops on current cpu
 + * ftrace_function_local_enable - enable ftrace_ops on current cpu
   *
   * This function enables tracing on current cpu by decreasing
   * the per cpu control variable.
   * It must be called with preemption disabled and only on ftrace_ops
 - * registered with FTRACE_OPS_FL_CONTROL. If called without preemption
 + * registered with FTRACE_OPS_FL_PER_CPU. If called without preemption
   * disabled, this_cpu_ptr will complain when CONFIG_DEBUG_PREEMPT is enabled.
   */
  static inline void ftrace_function_local_enable(struct ftrace_ops *ops)
  {
 -      if (WARN_ON_ONCE(!(ops->flags & FTRACE_OPS_FL_CONTROL)))
 +      if (WARN_ON_ONCE(!(ops->flags & FTRACE_OPS_FL_PER_CPU)))
                return;
  
        (*this_cpu_ptr(ops->disabled))--;
  }
  
  /**
 - * ftrace_function_local_disable - enable controlled ftrace_ops on current cpu
 + * ftrace_function_local_disable - disable ftrace_ops on current cpu
   *
 - * This function enables tracing on current cpu by decreasing
 + * This function disables tracing on current cpu by increasing
   * the per cpu control variable.
   * It must be called with preemption disabled and only on ftrace_ops
 - * registered with FTRACE_OPS_FL_CONTROL. If called without preemption
 + * registered with FTRACE_OPS_FL_PER_CPU. If called without preemption
   * disabled, this_cpu_ptr will complain when CONFIG_DEBUG_PREEMPT is enabled.
   */
  static inline void ftrace_function_local_disable(struct ftrace_ops *ops)
  {
 -      if (WARN_ON_ONCE(!(ops->flags & FTRACE_OPS_FL_CONTROL)))
 +      if (WARN_ON_ONCE(!(ops->flags & FTRACE_OPS_FL_PER_CPU)))
                return;
  
        (*this_cpu_ptr(ops->disabled))++;
   *
   * This function returns value of ftrace_ops::disabled on current cpu.
   * It must be called with preemption disabled and only on ftrace_ops
 - * registered with FTRACE_OPS_FL_CONTROL. If called without preemption
 + * registered with FTRACE_OPS_FL_PER_CPU. If called without preemption
   * disabled, this_cpu_ptr will complain when CONFIG_DEBUG_PREEMPT is enabled.
   */
  static inline int ftrace_function_local_disabled(struct ftrace_ops *ops)
  {
 -      WARN_ON_ONCE(!(ops->flags & FTRACE_OPS_FL_CONTROL));
 +      WARN_ON_ONCE(!(ops->flags & FTRACE_OPS_FL_PER_CPU));
        return *this_cpu_ptr(ops->disabled);
  }
  
@@@ -297,21 -295,6 +296,21 @@@ int ftrace_arch_code_modify_post_proces
  
  struct dyn_ftrace;
  
 +enum ftrace_bug_type {
 +      FTRACE_BUG_UNKNOWN,
 +      FTRACE_BUG_INIT,
 +      FTRACE_BUG_NOP,
 +      FTRACE_BUG_CALL,
 +      FTRACE_BUG_UPDATE,
 +};
 +extern enum ftrace_bug_type ftrace_bug_type;
 +
 +/*
 + * Archs can set this to point to a variable that holds the value that was
 + * expected at the call site before calling ftrace_bug().
 + */
 +extern const void *ftrace_expected;
 +
  void ftrace_bug(int err, struct dyn_ftrace *rec);
  
  struct seq_file;
@@@ -357,7 -340,6 +356,7 @@@ bool is_ftrace_trampoline(unsigned lon
   *  REGS    - the record wants the function to save regs
   *  REGS_EN - the function is set up to save regs.
   *  IPMODIFY - the record allows for the IP address to be changed.
 + *  DISABLED - the record is not ready to be touched yet
   *
   * When a new ftrace_ops is registered and wants a function to save
   * pt_regs, the rec->flag REGS is set. When the function has been
@@@ -372,11 -354,10 +371,11 @@@ enum 
        FTRACE_FL_TRAMP         = (1UL << 28),
        FTRACE_FL_TRAMP_EN      = (1UL << 27),
        FTRACE_FL_IPMODIFY      = (1UL << 26),
 +      FTRACE_FL_DISABLED      = (1UL << 25),
  };
  
 -#define FTRACE_REF_MAX_SHIFT  26
 -#define FTRACE_FL_BITS                6
 +#define FTRACE_REF_MAX_SHIFT  25
 +#define FTRACE_FL_BITS                7
  #define FTRACE_FL_MASKED_BITS ((1UL << FTRACE_FL_BITS) - 1)
  #define FTRACE_FL_MASK                (FTRACE_FL_MASKED_BITS << FTRACE_REF_MAX_SHIFT)
  #define FTRACE_REF_MAX                ((1UL << FTRACE_REF_MAX_SHIFT) - 1)
This page took 0.036673 seconds and 5 git commands to generate.