1. 01 Dec, 2015 1 commit
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Add sched_wakeup_new and sched_waking tracepoints for pid filter · 0f72e37e
      Steven Rostedt (Red Hat) authored
      
      
      The set_event_pid filter relies on attaching to the sched_switch and
      sched_wakeup tracepoints to see if it should filter the tracing on schedule
      tracepoints. By adding the callbacks to sched_wakeup, pids in the
      set_event_pid file will trace the wakeups of those tasks with those pids.
      
      But sched_wakeup_new and sched_waking were missed. These two should also be
      traced. Luckily, these tracepoints share the same class as sched_wakeup
      which means they can use the same pre and post callbacks as sched_wakeup
      does.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      0f72e37e
  2. 04 Nov, 2015 1 commit
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Put back comma for empty fields in boot string parsing · 43ed3843
      Steven Rostedt (Red Hat) authored
      
      
      Both early_enable_events() and apply_trace_boot_options() parse a boot
      string that may get parsed later on. They both use strsep() which converts a
      comma into a nul character. To still allow the boot string to be parsed
      again the same way, the nul character gets converted back to a comma after
      the token is processed.
      
      The problem is that these two functions check for an empty parameter (two
      commas in a row ",,"), and continue the loop if the parameter is empty, but
      fails to place the comma back. In this case, the second parsing will end at
      this blank field, and not process fields afterward.
      
      In most cases, users should not have an empty field, but if its going to be
      checked, the code might as well be correct.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      43ed3843
  3. 02 Nov, 2015 1 commit
  4. 26 Oct, 2015 4 commits
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Fix sparse RCU warning · fb662288
      Steven Rostedt (Red Hat) authored
      
      
      p_start() and p_stop() are seq_file functions that match. Teach sparse to
      know that rcu_read_lock_sched() that is taken by p_start() is released by
      p_stop.
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      fb662288
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Check all tasks on each CPU when filtering pids · 8ca532ad
      Steven Rostedt (Red Hat) authored
      
      
      My tests found that if a task is running but not filtered when set_event_pid
      is modified, then it can still be traced.
      
      Call on_each_cpu() to check if the current running task should be filtered
      and update the per cpu flags of tr->data appropriately.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      8ca532ad
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Implement event pid filtering · 3fdaf80f
      Steven Rostedt (Red Hat) authored
      
      
      Add the necessary hooks to use the pids loaded in set_event_pid to filter
      all the events enabled in the tracing instance that match the pids listed.
      
      Two probes are added to both sched_switch and sched_wakeup tracepoints to be
      called before other probes are called and after the other probes are called.
      The first is used to set the necessary flags to let the probes know to test
      if they should be traced or not.
      
      The sched_switch pre probe will set the "ignore_pid" flag if neither the
      previous or next task has a matching pid.
      
      The sched_switch probe will set the "ignore_pid" flag if the next task
      does not match the matching pid.
      
      The pre probe allows for probes tracing sched_switch to be traced if
      necessary.
      
      The sched_wakeup pre probe will set the "ignore_pid" flag if neither the
      current task nor the wakee task has a matching pid.
      
      The sched_wakeup post probe will set the "ignore_pid" flag if the current
      task does not have a matching pid.
      
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      3fdaf80f
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Add set_event_pid directory for future use · 49090107
      Steven Rostedt (Red Hat) authored
      
      
      Create a tracing directory called set_event_pid, which currently has no
      function, but will be used to filter all events for the tracing instance or
      the pids that are added to the file.
      
      The reason no functionality is added with this commit is that this commit
      focuses on the creation and removal of the pids in a safe manner. And tests
      can be made against this change to make sure things are correct before
      hooking features to the list of pids.
      
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      49090107
  5. 01 Oct, 2015 1 commit
  6. 30 Sep, 2015 2 commits
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Make ftrace_trace_stack() depend on general trace_array flag · 2d34f489
      Steven Rostedt (Red Hat) authored
      
      
      In preparation for the multi buffer instances to have their own trace_flags,
      the check in ftrace_trace_stack() needs to test the trace_array descriptor
      flag that is for the current event, not the global_trace descriptor.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      2d34f489
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Move trace_flags from global to a trace_array field · 983f938a
      Steven Rostedt (Red Hat) authored
      
      
      In preparation to make trace options per instance, the global trace_flags
      needs to be moved from being a global variable to a field within the trace
      instance trace_array structure.
      
      There's still more work to do, as there's some functions that use
      trace_flags without passing in a way to get to the current_trace array. For
      those, the global_trace is used directly (from trace.c). This includes
      setting and clearing the trace_flags. This means that when a new instance is
      created, it just gets the trace_flags of the global_trace and will not be
      able to modify them. Depending on the functions that have access to the
      trace_array, the flags of an instance may not affect parts of its trace,
      where the global_trace is used. These will be fixed in future changes.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      983f938a
  7. 25 Sep, 2015 1 commit
  8. 11 Aug, 2015 1 commit
  9. 13 May, 2015 7 commits
  10. 17 Apr, 2015 1 commit
  11. 16 Apr, 2015 1 commit
  12. 15 Apr, 2015 1 commit
  13. 08 Apr, 2015 2 commits
  14. 03 Feb, 2015 1 commit
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Convert the tracing facility over to use tracefs · 8434dc93
      Steven Rostedt (Red Hat) authored
      
      
      debugfs was fine for the tracing facility as a quick way to get
      an interface. Now that tracing has matured, it should separate itself
      from debugfs such that it can be mounted separately without needing
      to mount all of debugfs with it. That is, users resist using tracing
      because it requires mounting debugfs. Having tracing have its own file
      system lets users get the features of tracing without needing to bring
      in the rest of the kernel's debug infrastructure.
      
      Another reason for tracefs is that debubfs does not support mkdir.
      Currently, to create instances, one does a mkdir in the tracing/instance
      directory. This is implemented via a hack that forces debugfs to do
      something it is not intended on doing. By converting over to tracefs, this
      hack can be removed and mkdir can be properly implemented. This patch does
      not address this yet, but it lays the ground work for that to be done.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      8434dc93
  15. 22 Jan, 2015 1 commit
  16. 15 Jan, 2015 1 commit
  17. 15 Dec, 2014 2 commits
  18. 20 Nov, 2014 2 commits
  19. 14 Nov, 2014 1 commit
  20. 03 Nov, 2014 1 commit
  21. 08 Oct, 2014 1 commit
  22. 16 Jul, 2014 2 commits
  23. 14 Jul, 2014 1 commit
  24. 01 Jul, 2014 1 commit
  25. 06 Jun, 2014 1 commit
  26. 09 Apr, 2014 1 commit