1. 30 4月, 2016 4 次提交
  2. 27 4月, 2016 2 次提交
  3. 26 4月, 2016 1 次提交
    • S
      tracing: Do not inherit event-fork option for instances · 20550622
      Steven Rostedt (Red Hat) 提交于
      As the event-fork option requires doing work when enabled and disabled, it
      can not be passed down to created instances. The instance must clear this
      flag when it is created, and must clear it when its removed.
      
      As more options may be created with this need, a macro ZEROED_TRACE_FLAGS is
      created that holds the flags that must not be inherited by the top level
      instance, and must be cleared on removal of instances.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      20550622
  4. 20 4月, 2016 15 次提交
  5. 19 4月, 2016 1 次提交
    • S
      tracing: Add infrastructure to allow set_event_pid to follow children · c37775d5
      Steven Rostedt 提交于
      Add the infrastructure needed to have the PIDs in set_event_pid to
      automatically add PIDs of the children of the tasks that have their PIDs in
      set_event_pid. This will also remove PIDs from set_event_pid when a task
      exits
      
      This is implemented by adding hooks into the fork and exit tracepoints. On
      fork, the PIDs are added to the list, and on exit, they are removed.
      
      Add a new option called event_fork that when set, PIDs in set_event_pid will
      automatically get their children PIDs added when they fork, as well as any
      task that exits will have its PID removed from set_event_pid.
      
      This works for instances as well.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      c37775d5
  6. 23 3月, 2016 2 次提交
  7. 19 3月, 2016 1 次提交
  8. 18 3月, 2016 1 次提交
  9. 09 3月, 2016 1 次提交
    • C
      tracing: Make tracer_flags use the right set_flag callback · d39cdd20
      Chunyu Hu 提交于
      When I was updating the ftrace_stress test of ltp. I encountered
      a strange phenomemon, excute following steps:
      
      echo nop > /sys/kernel/debug/tracing/current_tracer
      echo 0 > /sys/kernel/debug/tracing/options/funcgraph-cpu
      bash: echo: write error: Invalid argument
      
      check dmesg:
      [ 1024.903855] nop_test_refuse flag set to 0: we refuse.Now cat trace_options to see the result
      
      The reason is that the trace option test will randomly setup trace
      option under tracing/options no matter what the current_tracer is.
      but the set_tracer_option is always using the set_flag callback
      from the current_tracer. This patch adds a pointer to tracer_flags
      and make it point to the tracer it belongs to. When the option is
      setup, the set_flag of the right tracer will be used no matter
      what the the current_tracer is.
      
      And the old dummy_tracer_flags is used for all the tracers which
      doesn't have a tracer_flags, having issue to use it to save the
      pointer of a tracer. So remove it and use dynamic dummy tracer_flags
      for tracers needing a dummy tracer_flags, as a result, there are no
      tracers sharing tracer_flags, so remove the check code.
      
      And save the current tracer to trace_option_dentry seems not good as
      it may waste mem space when mount the debug/trace fs more than one time.
      
      Link: http://lkml.kernel.org/r/1457444222-8654-1-git-send-email-chuhu@redhat.comSigned-off-by: NChunyu Hu <chuhu@redhat.com>
      [ Fixed up function tracer options to work with the change ]
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      d39cdd20
  10. 14 1月, 2016 1 次提交
    • S
      tracing: Fix stacktrace skip depth in trace_buffer_unlock_commit_regs() · 7717c6be
      Steven Rostedt (Red Hat) 提交于
      While cleaning the stacktrace code I unintentially changed the skip depth of
      trace_buffer_unlock_commit_regs() from 0 to 6. kprobes uses this function,
      and with skipping 6 call backs, it can easily produce no stack.
      
      Here's how I tested it:
      
       # echo 'p:ext4_sync_fs ext4_sync_fs ' > /sys/kernel/debug/tracing/kprobe_events
       # echo 1 > /sys/kernel/debug/tracing/events/kprobes/enable
       # cat /sys/kernel/debug/trace
                  sync-2394  [005]   502.457060: ext4_sync_fs: (ffffffff81317650)
                  sync-2394  [005]   502.457063: kernel_stack:         <stack trace>
                  sync-2394  [005]   502.457086: ext4_sync_fs: (ffffffff81317650)
                  sync-2394  [005]   502.457087: kernel_stack:         <stack trace>
                  sync-2394  [005]   502.457091: ext4_sync_fs: (ffffffff81317650)
      
      After putting back the skip stack to zero, we have:
      
                  sync-2270  [000]   748.052693: ext4_sync_fs: (ffffffff81317650)
                  sync-2270  [000]   748.052695: kernel_stack:         <stack trace>
       => iterate_supers (ffffffff8126412e)
       => sys_sync (ffffffff8129c4b6)
       => entry_SYSCALL_64_fastpath (ffffffff8181f0b2)
                  sync-2270  [000]   748.053017: ext4_sync_fs: (ffffffff81317650)
                  sync-2270  [000]   748.053019: kernel_stack:         <stack trace>
       => iterate_supers (ffffffff8126412e)
       => sys_sync (ffffffff8129c4b6)
       => entry_SYSCALL_64_fastpath (ffffffff8181f0b2)
                  sync-2270  [000]   748.053381: ext4_sync_fs: (ffffffff81317650)
                  sync-2270  [000]   748.053383: kernel_stack:         <stack trace>
       => iterate_supers (ffffffff8126412e)
       => sys_sync (ffffffff8129c4b6)
       => entry_SYSCALL_64_fastpath (ffffffff8181f0b2)
      
      Cc: stable@vger.kernel.org # v4.4+
      Fixes: 73dddbb5 "tracing: Only create stacktrace option when STACKTRACE is configured"
      Reported-by: NBrendan Gregg <brendan.d.gregg@gmail.com>
      Tested-by: NBrendan Gregg <brendan.d.gregg@gmail.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      7717c6be
  11. 10 11月, 2015 1 次提交
  12. 08 11月, 2015 1 次提交
  13. 06 11月, 2015 1 次提交
  14. 04 11月, 2015 3 次提交
  15. 03 11月, 2015 1 次提交
  16. 01 10月, 2015 4 次提交