1. 11 Nov, 2008 7 commits
    • Ingo Molnar's avatar
    • Steven Rostedt's avatar
      ring-buffer: replace most bug ons with warn on and disable buffer · f536aafc
      Steven Rostedt authored
      This patch replaces most of the BUG_ONs in the ring_buffer code with
      RB_WARN_ON variants. It adds some more variants as needed for the
      replacement. This lets the buffer die nicely and still warn the user.
      
      One BUG_ON remains in the code, and that is because it detects a
      bad pointer passed in by the calling function, and not a bug by
      the ring buffer code itself.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f536aafc
    • Steven Rostedt's avatar
      ftrace: prevent ftrace_special from recursion · 5aa1ba6a
      Steven Rostedt authored
      Impact: stop ftrace_special from recursion
      
      The ftrace_special is used to help debug areas of the kernel.
      Because of this, if it is put in certain locations, the fact that
      it allows recursion can become a problem if the kernel developer
      using does not realize that.
      
      This patch changes ftrace_special to not allow recursion into itself
      to make it more robust.
      
      It also changes from preempt disable interrupts disable to prevent
      any loss of trace entries.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      5aa1ba6a
    • Ingo Molnar's avatar
      Merge branch 'tracing/urgent' into tracing/ftrace · e0cb4ebc
      Ingo Molnar authored
      Conflicts:
      	kernel/trace/trace.c
      e0cb4ebc
    • Ingo Molnar's avatar
      Merge branch 'devel' of... · 45b86a96
      Ingo Molnar authored
      Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/urgent
      45b86a96
    • Steven Rostedt's avatar
      ring-buffer: prevent infinite looping on time stamping · 4143c5cb
      Steven Rostedt authored
      Impact: removal of unnecessary looping
      
      The lockless part of the ring buffer allows for reentry into the code
      from interrupts. A timestamp is taken, a test is preformed and if it
      detects that an interrupt occurred that did tracing, it tries again.
      
      The problem arises if the timestamp code itself causes a trace.
      The detection will detect this and loop again. The difference between
      this and an interrupt doing tracing, is that this will fail every time,
      and cause an infinite loop.
      
      Currently, we test if the loop happens 1000 times, and if so, it will
      produce a warning and disable the ring buffer.
      
      The problem with this approach is that it makes it difficult to perform
      some types of tracing (tracing the timestamp code itself).
      
      Each trace entry has a delta timestamp from the previous entry.
      If a trace entry is reserved but and interrupt occurs and traces before
      the previous entry is commited, the delta timestamp for that entry will
      be zero. This actually makes sense in terms of tracing, because the
      interrupt entry happened before the preempted entry was commited, so
      one may consider the two happening at the same time. The order is
      still preserved in the buffer.
      
      With this idea, instead of trying to get a new timestamp if an interrupt
      made it in between the timestamp and the test, the entry could simply
      make the delta zero and continue. This will prevent interrupts or
      tracers in the timer code from causing the above loop.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      4143c5cb
    • Steven Rostedt's avatar
      ftrace: disable tracing on resize · bf5e6519
      Steven Rostedt authored
      Impact: fix for bug on resize
      
      This patch addresses the bug found here:
      
       http://bugzilla.kernel.org/show_bug.cgi?id=11996
      
      When ftrace converted to the new unified trace buffer, the resizing of
      the buffer was not protected as much as it was originally. If tracing
      is performed while the resize occurs, then the buffer can be corrupted.
      
      This patch disables all ftrace buffer modifications before a resize
      takes place.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      bf5e6519
  2. 10 Nov, 2008 8 commits
  3. 09 Nov, 2008 13 commits
  4. 08 Nov, 2008 12 commits