1. 20 Oct, 2010 4 commits
    • Steven Rostedt's avatar
      ring-buffer: Bind time extend and data events together · 69d1b839
      Steven Rostedt authored
      When the time between two timestamps is greater than
      2^27 nanosecs (~134 ms) a time extend event is added that extends
      the time difference to 59 bits (~18 years). This is due to
      events only having a 27 bit field to store time.
      
      Currently this time extend is a separate event. We add it just before
      the event data that is being written to the buffer. But before
      the event data is committed, the event data can also be discarded (as
      with the case of filters). But because the time extend has already been
      committed, it will stay in the buffer.
      
      If lots of events are being filtered and no event is being
      written, then every 134ms a time extend can be added to the buffer
      without any data attached. To keep from filling the entire buffer
      with time extends, a time extend will never be the first event
      in a page because the page timestamp can be used. Time extends can
      only fill the rest of a page with some data at the beginning.
      
      This patch binds the time extend with the data. The difference here
      is that the time extend is not committed before the data is added.
      Instead, when a time extend is needed, the space reserved on
      the ring buffer is the time extend + the data event size. The
      time extend is added to the first part of the reserved block and
      the data is added to the second. The time extend event is passed
      back to the reserver, but since the reserver also uses a function
      to find the data portion of the reserved block, no changes to the
      ring buffer interface need to be made.
      
      When a commit is discarded, we now remove both the time extend and
      the event. With this approach no more than one time extend can
      be in the buffer in a row. Data must always follow a time extend.
      
      Thanks to Mathieu Desnoyers for suggesting this idea.
      Suggested-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      69d1b839
    • Steven Rostedt's avatar
      ring-buffer: Remove ring_buffer_event_time_delta() · afcc5c68
      Steven Rostedt authored
      The ring_buffer_event_time_delta() static inline function does not
      have any users. Remove it.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      afcc5c68
    • Steven Rostedt's avatar
      ring-buffer: Pass delta by value and not by reference · f25106ae
      Steven Rostedt authored
      The delta between events is passed to the timestamp code by reference
      and the timestamp code will reset the value. But it can be reset
      from the caller. No need to pass it in by reference.
      
      By changing the call to pass by value, lets gcc optimize the code
      a bit more where it can store the delta in a register and not
      worry about updating the reference.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      f25106ae
    • Steven Rostedt's avatar
      ring-buffer: Pass timestamp by value and not by reference · e8bc43e8
      Steven Rostedt authored
      The original code for the ring buffer had locations that modified
      the timestamp and that change was used by the callers. Now,
      the timestamp is not reused by the callers and there is no reason
      to pass it by reference.
      
      By changing the call to pass by value, lets gcc optimize the code
      a bit more where it can store the timestamp in a register and not
      worry about updating the reference.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      e8bc43e8
  2. 19 Oct, 2010 2 commits
  3. 18 Oct, 2010 18 commits
  4. 17 Oct, 2010 4 commits
  5. 16 Oct, 2010 4 commits
  6. 15 Oct, 2010 8 commits