1. 15 Sep, 2010 11 commits
  2. 14 Sep, 2010 4 commits
    • Steven Rostedt's avatar
      tracing: Fix reading of set_ftrace_filter across lists · 57c072c7
      Steven Rostedt authored
      If we do:
      
       # cd /sys/kernel/debug
       # echo 'do_IRQ:traceon schedule:traceon sys_write:traceon' > \
          set_ftrace_filter
       # cat set_ftrace_filter
      
      We get the following output:
      
       #### all functions enabled ####
       sys_write:traceon:unlimited
       schedule:traceon:unlimited
       do_IRQ:traceon:unlimited
      
      This outputs two lists. One is the fact that all functions are
      currently enabled for function tracing, the other has three probed
      functions, which happen to have 'traceon' as their commands.
      
      Currently, when reading the first list (functions enabled) the
      seq_file code will receive a "NULL" from the t_next() function
      causing it to exit early. This makes "read()" from userspace stop
      reading the code at this boarder. Although read is allowed to do this,
      some (broken) applications might consider this an end of file and
      stop early.
      
      This patch adds the start of the second list to t_next() when it
      finishes the first list. It is a simple change and gives the
      set_ftrace_filter file nicer reading ability.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      57c072c7
    • Steven Rostedt's avatar
      tracing: Keep track of set_ftrace_filter position and allow lseek again · 98c4fd04
      Steven Rostedt authored
      This patch keeps track of the index within the elements of
      set_ftrace_filter and if the position goes backwards, it nicely
      resets and starts from the beginning again.
      
      This allows for lseek and pread to work properly now.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      98c4fd04
    • Steven Rostedt's avatar
      tracing: Replace typecasted void pointer in set_ftrace_filter code · 4aeb6967
      Steven Rostedt authored
      The set_ftrace_filter uses seq_file and reads from two lists. The
      pointer returned by t_next() can either be of type struct dyn_ftrace
      or struct ftrace_func_probe. If there is a bug (there was one)
      the wrong pointer may be used and the reference can cause an oops.
      
      This patch makes t_next() and friends only return the iterator structure
      which now has a pointer of type struct dyn_ftrace and struct
      ftrace_func_probe. The t_show() can now test if the pointer is NULL or
      not and if the pointer exists, it is guaranteed to be of the correct type.
      
      Now if there's a bug, only wrong data will be shown but not an oops.
      
      Cc: Chris Wright <chrisw@sous-sol.org>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      4aeb6967
    • Steven Rostedt's avatar
      tracing: Do not reset *pos in set_ftrace_filter · 2bccfffd
      Steven Rostedt authored
      After the filtered functions are read, the probed functions are read
      from the hash in set_ftrace_filter. When the hashed probed functions
      are read, the *pos passed in is reset. Instead of modifying the pos
      given to the read function, just record the pos where the filtered
      functions ended and subtract from that.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      2bccfffd
  3. 13 Sep, 2010 18 commits
  4. 12 Sep, 2010 1 commit
  5. 11 Sep, 2010 6 commits