1. 31 10月, 2008 1 次提交
    • S
      ftrace: handle archs that do not support irqs_disabled_flags · 9244489a
      Steven Rostedt 提交于
      Impact: build fix on non-lockdep architectures
      
      Some architectures do not support a way to read the irq flags that
      is set from "local_irq_save(flags)" to determine if interrupts were
      disabled or enabled. Ftrace uses this information to display to the user
      if the trace occurred with interrupts enabled or disabled.
      
      Besides the fact that those archs that do not support this will fail to
      compile, unless they fix it, we do not want to have the trace simply
      say interrupts were not disabled or they were enabled, without knowing
      the real answer.
      
      This patch adds a 'X' in the output to let the user know that the
      architecture they are running on does not support a way for the tracer
      to determine if interrupts were enabled or disabled. It also lets those
      same archs compile with tracing enabled.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9244489a
  2. 30 10月, 2008 1 次提交
    • S
      ftrace: fix trace_nop config select · f3384b28
      Steven Rostedt 提交于
      Impact: build fix on non-function-tracing architectures
      
      The trace_nop is the tracer that is defined when no tracer is set in
      the ftrace infrastructure.
      
      The trace_nop was mistakenly selected by HAVE_FTRACE due to the confusion
      between ftrace infrastructure and the ftrace function tracer (which has
      been solved by renaming the function tracer).
      
      This patch changes the select to the approriate TRACING.
      
      This patch should fix compile errors on architectures that do not define
      the FUNCTION_TRACER.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f3384b28
  3. 29 10月, 2008 1 次提交
    • F
      ftrace: perform an initialization for ftrace to enable it · 0b6e4d56
      Frederic Weisbecker 提交于
      Impact: corrects a bug which made the non-dyn function tracer not functional
      
      With latest git, the non-dynamic function tracer didn't get any trace.
      
      The problem was the fact that ftrace_enabled wasn't initialized to 1
      because ftrace hasn't any init function when DYNAMIC_FTRACE is disabled.
      
      So when a tracer tries to register an ftrace_ops struct,
      __register_ftrace_function failed to set the hook.
      
      This patch corrects it by setting an init function to initialize
      ftrace during the boot.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0b6e4d56
  4. 28 10月, 2008 2 次提交
    • S
      ftrace: fix current_tracer error return · 60063a66
      Steven Rostedt 提交于
      The commit (in linux-tip) c2931e05
       ( ftrace: return an error when setting a nonexistent tracer )
      added useful code that would error when a bad tracer was written into
      the current_tracer file.
      
      But this had a bug if the amount written was more than the amount read by
      that code. The first iteration would set the tracer correctly, but since
      it did not consume the rest of what was written (usually whitespace), the
      userspace utility would continue to write what was not consumed. This
      second iteration would fail to find a tracer and return -EINVAL. Funny
      thing is that the tracer would have already been set.
      
      This patch just consumes all the data that is written to the file.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      60063a66
    • F
      tracing: fix a build error on alpha · 21798a84
      Frederic Weisbecker 提交于
      Impact: build fix on Alpha
      
      When tracing is enabled, some arch have included <linux/irqflags.h>
      on their <asm/system.h> but others like alpha or m68k don't.
      
      Build error on alpha:
      
      kernel/trace/trace.c: In function 'tracing_cpumask_write':
      kernel/trace/trace.c:2145: error: implicit declaration of function 'raw_local_irq_disable'
      kernel/trace/trace.c:2162: error: implicit declaration of function 'raw_local_irq_enable'
      
      Tested on Alpha through a cross-compiler (should correct a similar issue on m68k).
      Reported-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      21798a84
  5. 27 10月, 2008 2 次提交
    • F
      tracing/ftrace: make boot tracer select the sched_switch tracer · ea31e72d
      Frederic Weisbecker 提交于
      Impact: build fix
      
      If the boot tracer is selected but not the sched_switch,
      there will be a build failure:
      
       kernel/built-in.o: In function `boot_trace_init':
       trace_boot.c:(.text+0x5ee38): undefined reference to `sched_switch_trace'
       kernel/built-in.o: In function `disable_boot_trace':
       (.text+0x5eee1): undefined reference to `tracing_stop_cmdline_record'
       kernel/built-in.o: In function `enable_boot_trace':
       (.text+0x5ef11): undefined reference to `tracing_start_cmdline_record'
      
      This patch fixes it.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ea31e72d
    • S
      trace: fix printk warning for u64 · e2862c94
      Stephen Rothwell 提交于
      A powerpc ppc64_defconfig build produces these warnings:
      
      kernel/trace/ring_buffer.c: In function 'rb_add_time_stamp':
      kernel/trace/ring_buffer.c:969: warning: format '%llu' expects type 'long long unsigned int', but argument 2 has type 'u64'
      kernel/trace/ring_buffer.c:969: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'u64'
      kernel/trace/ring_buffer.c:969: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type 'u64'
      
      Just cast the u64s to unsigned long long like we do everywhere else.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e2862c94
  6. 24 10月, 2008 1 次提交
    • I
      ftrace: warning in kernel/trace/ftrace.c · f17845e5
      Ingo Molnar 提交于
      this warning:
      
        kernel/trace/ftrace.c:189: warning: ‘frozen_record_count’ defined but not used
      
      triggers because frozen_record_count is only used in the KCONFIG_MARKERS
      case. Move the variable it there.
      
      Alas, this frozen-record facility seems to have little use. The
      frozen_record_count variable is not used by anything, nor the flags.
      
      So this section might need a bit of dead-code-removal care as well.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f17845e5
  7. 23 10月, 2008 7 次提交
  8. 22 10月, 2008 2 次提交
  9. 21 10月, 2008 5 次提交
    • S
      ftrace: stack tracer only record when on stack · 81520a1b
      Steven Rostedt 提交于
      The stack trace API does not record if the stack is not on the current
      task's stack. That is, if the stack is the interrupt stack or NMI stack,
      the output does not show. Also, the size of those stacks are not
      consistent with the size of the thread stack, this makes the calculation
      of the stack size usually bogus.
      
      This all confuses the stack tracer. I unfortunately do not have time to
      fix all these problems, but this patch does record the worst stack when
      the stack pointer is on the tasks stack (instead of bogus numbers).
      
      The patch simply returns if the stack pointer is not on the task's stack.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      81520a1b
    • S
      ftrace: rename the ftrace tracer to function · 3ce83aea
      Steven Rostedt 提交于
      To avoid further confusion between the ftrace infrastructure and the
      function tracer. This patch renames the "ftrace" function tracer
      to "function".
      
      Now in available_tracers, instead of "ftrace" there will be "function".
      
      This makes more sense, since people will not know exactly what the
      "ftrace" tracer does.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3ce83aea
    • S
      ftrace: rename FTRACE to FUNCTION_TRACER · 606576ce
      Steven Rostedt 提交于
      Due to confusion between the ftrace infrastructure and the gcc profiling
      tracer "ftrace", this patch renames the config options from FTRACE to
      FUNCTION_TRACER.  The other two names that are offspring from FTRACE
      DYNAMIC_FTRACE and FTRACE_MCOUNT_RECORD will stay the same.
      
      This patch was generated mostly by script, and partially by hand.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      606576ce
    • S
      ftrace: fix depends · c2db8054
      Steven Rostedt 提交于
      A lot of tracers have HAVE_FTRACE as a dependent config where it
      really should not. The HAVE_FTRACE is a misnomer (soon to be fixed)
      and describes if the architecture has the function tracer (mcount)
      implemented. The ftrace infrastructure is implemented in all archs.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c2db8054
    • S
      ftrace: release functions from hash · bd95b88d
      Steven Rostedt 提交于
      The x86 architecture uses a static recording of mcount caller locations
      and is not affected by this patch.
      
      For architectures still using the dynamic ftrace daemon, this patch is
      critical. It removes the race between the recording of a function that
      calls mcount, the unloading of a module, and the ftrace daemon updating
      the call sites.
      
      This patch adds the releasing of the hash functions that the daemon uses
      to update the mcount call sites. When a module is unloaded, not only
      are the replaced call site table update, but now so is the hash recorded
      functions that the ftrace daemon will use.
      
      Again, architectures that implement MCOUNT_RECORD are not affected by
      this (which currently only x86 has).
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bd95b88d
  10. 14 10月, 2008 18 次提交