1. 26 10月, 2015 1 次提交
    • S
      tracepoint: Give priority to probes of tracepoints · 7904b5c4
      Steven Rostedt (Red Hat) 提交于
      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: NSteven Rostedt <rostedt@goodmis.org>
      7904b5c4
  2. 23 10月, 2015 1 次提交
  3. 21 10月, 2015 6 次提交
  4. 16 10月, 2015 1 次提交
  5. 14 10月, 2015 1 次提交
  6. 01 10月, 2015 8 次提交
  7. 30 9月, 2015 11 次提交
    • S
      tracing: Remove access to trace_flags in trace_printk.c · b9f9108c
      Steven Rostedt (Red Hat) 提交于
      In the effort to move the global trace_flags to the tracing instances, the
      direct access to trace_flags must be removed from trace_printk.c
      
      Instead, add a new trace_printk_enabled boolean that is set by a new access
      function trace_printk_control(), that will enable or disable trace_printk.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      b9f9108c
    • S
      tracing: Add build bug if we have more trace_flags than bits · b5e87c05
      Steven Rostedt (Red Hat) 提交于
      Add a enum that denotes the last bit of the trace_flags and have a
      BUILD_BUG_ON(last_bit > 32).
      
      If we add more bits than we have in trace_flags, the kernel wont build.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      b5e87c05
    • S
      tracing: Always show all tracer options in the options directory · 41d9c0be
      Steven Rostedt (Red Hat) 提交于
      There are options that are unique to a specific tracer (like function and
      function graph). Currently, these options are only visible in the options
      directory when the tracer is enabled.
      
      This has been a pain, especially for something like the func_stack_trace
      option that if used inappropriately, could bring the system to a crawl. But
      the only way to see it, is to enable the function tracer.
      
      For example, if one had done:
      
       # cd /sys/kernel/tracing
       # echo __schedule > set_ftrace_filter
       # echo 1 > options/func_stack_trace
       # echo function > current_tracer
      
      The __schedule call will be traced and a stack trace will also be recorded
      there. Now when you were done, you may do...
      
       # echo nop > current_tracer
       # echo > set_ftrace_filter
      
      But you forgot to disable the func_stack_trace. The only way to disable it
      is to re-enable function tracing first. If you do not add a filter to
      set_ftrace_filter and just do:
      
       # echo function > current_tracer
      
      Now you would be performing a stack trace on *every* function! On some
      systems, that causes a live lock. Others may take a few minutes to fix your
      mistake.
      
      Having the func_stack_trace option visible allows you to check it and
      disable it before enabling the funtion tracer.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      41d9c0be
    • S
      tracing: Only create stacktrace option when STACKTRACE is configured · 73dddbb5
      Steven Rostedt (Red Hat) 提交于
      Only create the stacktrace trace option when CONFIG_STACKTRACE is
      configured.
      
      Cleaned up the ftrace_trace_stack() function call a little to allow better
      encapsulation of the stacktrace trace flag.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      73dddbb5
    • S
      tracing: Do not create function tracer options when not compiled in · 8179e8a1
      Steven Rostedt (Red Hat) 提交于
      When the function tracer is not compiled in, do not create the option files
      for it.
      
      Fix up both the sched_wakeup and irqsoff tracers to handle the change.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      8179e8a1
    • S
      tracing: Only create branch tracer options when compiled in · 4ee4301c
      Steven Rostedt (Red Hat) 提交于
      When the branch tracer is not compiled in, do not create the option files
      associated to it.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      4ee4301c
    • S
      tracing: Only create function graph options when it is compiled in · 729358da
      Steven Rostedt (Red Hat) 提交于
      Do not create fuction graph tracer options when function graph tracer is not
      even compiled in.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      729358da
    • S
      tracing: Use TRACE_FLAGS macro to keep enums and strings matched · a3418a36
      Steven Rostedt (Red Hat) 提交于
      Use a cute little macro trick to keep the names of the trace flags file
      guaranteed to match the corresponding masks.
      
      The macro TRACE_FLAGS is defined as a serious of enum names followed by
      the string name of the file that matches it. For example:
      
       #define TRACE_FLAGS						\
      		C(PRINT_PARENT,		"print-parent"),	\
      		C(SYM_OFFSET,		"sym-offset"),		\
      		C(SYM_ADDR,		"sym-addr"),		\
      		C(VERBOSE,		"verbose"),
      
      Now we can define the following:
      
       #undef C
       #define C(a, b) TRACE_ITER_##a##_BIT
       enum trace_iterator_bits { TRACE_FLAGS };
      
      The above creates:
      
       enum trace_iterator_bits {
      	TRACE_ITER_PRINT_PARENT_BIT,
      	TRACE_ITER_SYM_OFFSET_BIT,
      	TRACE_ITER_SYM_ADDR_BIT,
      	TRACE_ITER_VERBOSE_BIT,
       };
      
      Then we can redefine C as:
      
       #undef C
       #define C(a, b) TRACE_ITER_##a = (1 << TRACE_ITER_##a##_BIT)
       enum trace_iterator_flags { TRACE_FLAGS };
      
      Which creates:
      
       enum trace_iterator_flags {
      	TRACE_ITER_PRINT_PARENT	= (1 << TRACE_ITER_PRINT_PARENT_BIT),
      	TRACE_ITER_SYM_OFFSET	= (1 << TRACE_ITER_SYM_OFFSET_BIT),
      	TRACE_ITER_SYM_ADDR	= (1 << TRACE_ITER_SYM_ADDR_BIT),
      	TRACE_ITER_VERBOSE	= (1 << TRACE_ITER_VERBOSE_BIT),
       };
      
      Then finally we can create the list of file names:
      
       #undef C
       #define C(a, b) b
       static const char *trace_options[] = {
      	TRACE_FLAGS
      	NULL
       };
      
      Which creates:
       static const char *trace_options[] = {
      	"print-parent",
      	"sym-offset",
      	"sym-addr",
      	"verbose",
      	NULL
       };
      
      The importance of this is that the strings match the bit index.
      
      	trace_options[TRACE_ITER_SYM_ADDR_BIT] == "sym-addr"
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      a3418a36
    • S
      tracing: Use enums instead of hard coded bitmasks for TRACE_ITER flags · ce3fed62
      Steven Rostedt (Red Hat) 提交于
      Using enums with FLAG_BIT and then defining a FLAG = (1 << FLAG_BIT), is a
      bit more robust as we require that there are no bits out of order or skipped
      to match the file names that represent the bits.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      ce3fed62
    • S
      tracing: Remove unused tracing option "ftrace_preempt" · 938db5f5
      Steven Rostedt (Red Hat) 提交于
      There was a time where the function tracing would disable interrupts unless
      specifically told not to, where it would only disable preemption. With the
      new lockless code, the function tracing never disalbes interrupts and just
      uses disabling of preemption. Remove the option "ftrace_preempt" as it does
      nothing anyway.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      938db5f5
    • S
      tracing: Move "display-graph" option to main options · 03905582
      Steven Rostedt (Red Hat) 提交于
      In order to facilitate making all tracer options visible even when the
      tracer is not active, we need to get rid of duplicate options. Any option
      that is shared between multiple tracers really should be a main option.
      
      As the wakeup and irqsoff tracers both use the "display-graph" option, and
      use it exactly the same way, move that option from the tracer options to the
      main options and consolidate them.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      03905582
  8. 28 9月, 2015 3 次提交
  9. 26 9月, 2015 3 次提交
  10. 23 9月, 2015 2 次提交
  11. 21 9月, 2015 1 次提交
  12. 20 9月, 2015 2 次提交
    • L
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 99bc7215
      Linus Torvalds 提交于
      Pull ARM fixes from Russell King:
       "Three fixes and a resulting cleanup for -rc2:
      
         - Andre Przywara reported that he was seeing a warning with the new
           cast inside DMA_ERROR_CODE's definition, and fixed the incorrect
           use.
      
         - Doug Anderson noticed that kgdb causes a "scheduling while atomic"
           bug.
      
         - OMAP5 folk noticed that their Thumb-2 compiled X servers crashed
           when enabling support to cover ARMv6 CPUs due to a kernel bug
           leaking some conditional context into the signal handler"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8425/1: kgdb: Don't try to stop the machine when setting breakpoints
        ARM: 8437/1: dma-mapping: fix build warning with new DMA_ERROR_CODE definition
        ARM: get rid of needless #if in signal handling code
        ARM: fix Thumb2 signal handling when ARMv6 is enabled
      99bc7215
    • L
      Merge tag 'linux-kselftest-4.3-rc2' of... · 30ec5682
      Linus Torvalds 提交于
      Merge tag 'linux-kselftest-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "This update contains 7 fixes for problems ranging from build failurs
        to incorrect error reporting"
      
      * tag 'linux-kselftest-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: exec: revert to default emit rule
        selftests: change install command to rsync
        selftests: mqueue: simplify the Makefile
        selftests: mqueue: allow extra cflags
        selftests: rename jump label to static_keys
        selftests/seccomp: add support for s390
        seltests/zram: fix syntax error
      30ec5682