1. 06 Nov, 2015 1 commit
  2. 05 Nov, 2015 1 commit
  3. 04 Nov, 2015 2 commits
    • 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
    • Jiaxing Wang's avatar
      tracing: Apply tracer specific options from kernel command line. · a4d1e688
      Jiaxing Wang authored
      Currently, the trace_options parameter is only applied in
      tracer_alloc_buffers() when global_trace.current_trace is nop_trace,
      so a tracer specific option will not be applied even when the specific
      tracer is also enabled from kernel command line. For example, the
      'func_stack_trace' option can't be enabled with the following kernel
      parameter:
      
        ftrace=function ftrace_filter=kfree trace_options=func_stack_trace
      
      We can enable tracer specific options by simply apply the options again
      if the specific tracer is also supplied from command line and started
      in register_tracer().
      
      To make trace_boot_options_buf can be parsed again, a comma and a space
      is put back if they were replaced by strsep and strstrip respectively.
      
      Also make register_tracer() be __init to access the __init data, and
      in fact register_tracer is only called from __init code.
      
      Link: http://lkml.kernel.org/r/1446599669-9294-1-git-send-email-hello.wjx@gmail.comSigned-off-by: default avatarJiaxing Wang <hello.wjx@gmail.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      a4d1e688
  4. 03 Nov, 2015 10 commits
  5. 02 Nov, 2015 14 commits
  6. 26 Oct, 2015 5 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
    • Steven Rostedt (Red Hat)'s avatar
      tracepoint: Give priority to probes of tracepoints · 7904b5c4
      Steven Rostedt (Red Hat) authored
      In order to guarantee that a probe will be called before other probes that
      are attached to a tracepoint, there needs to be a mechanism to provide
      priority of one probe over the others.
      
      Adding a prio field to the struct tracepoint_func, which lets the probes be
      sorted by the priority set in the structure. If no priority is specified,
      then a priority of 10 is given (this is a macro, and perhaps may be changed
      in the future).
      
      Now probes may be added to affect other probes that are attached to a
      tracepoint with a guaranteed order.
      
      One use case would be to allow tracing of tracepoints be able to filter by
      pid. A special (higher priority probe) may be added to the sched_switch
      tracepoint and set the necessary flags of the other tracepoints to notify
      them if they should be traced or not. In case a tracepoint is enabled at the
      sched_switch tracepoint too, the order of the two are not random.
      
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      7904b5c4
  7. 22 Oct, 2015 1 commit
  8. 21 Oct, 2015 5 commits
  9. 20 Oct, 2015 1 commit