1. 28 Apr, 2010 1 commit
    • Steven Rostedt's avatar
      tracing: Fix sleep time function profiling · 37e44bc5
      Steven Rostedt authored
      When sleep_time is off the function profiler ignores the time that a task
      is scheduled out. When the task is scheduled out a timestamp is taken.
      When the task is scheduled back in, the timestamp is compared to the
      current time and the saved calltimes are adjusted accordingly.
      
      But when stopping the function profiler, the sched switch hook that
      does this adjustment was stopped before shutting down the tracer.
      This allowed some tasks to not get their timestamps set when they
      scheduled out. When the function profiler started again, this would
      skew the times of the scheduler functions.
      
      This patch moves the stopping of the sched switch to after the function
      profiler is stopped. It also ignores zero set calltimes, which may
      happen on start up.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      37e44bc5
  2. 27 Apr, 2010 5 commits
    • Chase Douglas's avatar
      tracing: Show sample std dev in function profiling · e330b3bc
      Chase Douglas authored
      When combined with function graph tracing the ftrace function profiler
      also prints the average run time of functions. While this gives us some
      good information, it doesn't tell us anything about the variance of the
      run times of the function. This change prints out the s^2 sample
      standard deviation alongside the average.
      
      This change adds one entry to the profile record structure. This
      increases the memory footprint of the function profiler by 1/3 on a
      32-bit system, and by 1/5 on a 64-bit system when function graphing is
      enabled, though the memory is only allocated when the profiler is turned
      on. During the profiling, one extra line of code adds the squared
      calltime to the new record entry, so this should not adversly affect
      performance.
      
      Note that the square of the sample standard deviation is printed because
      there is no sqrt implementation for unsigned long long in the kernel.
      Signed-off-by: default avatarChase Douglas <chase.douglas@canonical.com>
      LKML-Reference: <1272304925-2436-1-git-send-email-chase.douglas@canonical.com>
      
      [ fixed comment about ns^2 -> us^2 conversion ]
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      e330b3bc
    • Chase Douglas's avatar
      tracing: Add documentation for trace commands mod, traceon/traceoff · 07271aa4
      Chase Douglas authored
      The mod command went in as commit
      64e7c440
      
      The traceon/traceoff commands went in as commit
      23b4ff3aSigned-off-by: default avatarChase Douglas <chase.douglas@canonical.com>
      LKML-Reference: <1272045759-32018-1-git-send-email-chase.douglas@canonical.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      07271aa4
    • Steven Rostedt's avatar
      ring-buffer: Make benchmark handle missed events · a838b2e6
      Steven Rostedt authored
      With the addition of the "missed events" flags that is stored in the
      commit field of the ring buffer page, the ring_buffer_benchmark
      was not updated to handle this. If events are missed, then the
      missed events flag is set in the ring buffer page, the benchmark
      will count that flag as part of the size of the page and will hit the BUG()
      when it tries to read beyond the page.
      
      The solution is simply to have the ring buffer benchmark mask off
      the extra bits.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      a838b2e6
    • David Miller's avatar
      ring-buffer: Make non-consuming read less expensive with lots of cpus. · 72c9ddfd
      David Miller authored
      When performing a non-consuming read, a synchronize_sched() is
      performed once for every cpu which is actively tracing.
      
      This is very expensive, and can make it take several seconds to open
      up the 'trace' file with lots of cpus.
      
      Only one synchronize_sched() call is actually necessary.  What is
      desired is for all cpus to see the disabling state change.  So we
      transform the existing sequence:
      
      	for_each_cpu() {
      		ring_buffer_read_start();
      	}
      
      where each ring_buffer_start() call performs a synchronize_sched(),
      into the following:
      
      	for_each_cpu() {
      		ring_buffer_read_prepare();
      	}
      	ring_buffer_read_prepare_sync();
      	for_each_cpu() {
      		ring_buffer_read_start();
      	}
      
      wherein only the single ring_buffer_read_prepare_sync() call needs to
      do the synchronize_sched().
      
      The first phase, via ring_buffer_read_prepare(), allocates the 'iter'
      memory and increments ->record_disabled.
      
      In the second phase, ring_buffer_read_prepare_sync() makes sure this
      ->record_disabled state is visible fully to all cpus.
      
      And in the final third phase, the ring_buffer_read_start() calls reset
      the 'iter' objects allocated in the first phase since we now know that
      none of the cpus are adding trace entries any more.
      
      This makes openning the 'trace' file nearly instantaneous on a
      sparc64 Niagara2 box with 128 cpus tracing.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      LKML-Reference: <20100420.154711.11246950.davem@davemloft.net>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      72c9ddfd
    • Jiri Olsa's avatar
      tracing: Add graph output support for irqsoff tracer · 62b915f1
      Jiri Olsa authored
      Add function graph output to irqsoff tracer.
      
      The graph output is enabled by setting new 'display-graph' trace option.
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      LKML-Reference: <1270227683-14631-4-git-send-email-jolsa@redhat.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      62b915f1
  3. 26 Apr, 2010 2 commits
  4. 23 Apr, 2010 1 commit
  5. 21 Apr, 2010 2 commits
    • Frederic Weisbecker's avatar
      tracing: Dump either the oops's cpu source or all cpus buffers · cecbca96
      Frederic Weisbecker authored
      The ftrace_dump_on_oops kernel parameter, sysctl and sysrq let one
      dump every cpu buffers when an oops or panic happens.
      
      It's nice when you have few cpus but it may take ages if have many,
      plus you miss the real origin of the problem in all the cpu traces.
      
      Sometimes, all you need is to dump the cpu buffer that triggered the
      opps, most of the time it is our main interest.
      
      This patch modifies ftrace_dump_on_oops to handle this choice.
      
      The ftrace_dump_on_oops kernel parameter, when it comes alone, has
      the same behaviour than before. But ftrace_dump_on_oops=orig_cpu
      will only dump the buffer of the cpu that oops'ed.
      
      Similarly, sysctl kernel.ftrace_dump_on_oops=1 and
      echo 1 > /proc/sys/kernel/ftrace_dump_on_oops keep their previous
      behaviour. But setting 2 jumps into cpu origin dump mode.
      
      v2: Fix double setup
      v3: Fix spelling issues reported by Randy Dunlap
      v4: Also update __ftrace_dump in the selftests
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      cecbca96
    • Ingo Molnar's avatar
      Merge commit 'v2.6.34-rc5' into tracing/core · ac0053fd
      Ingo Molnar authored
      Merge reason: pick up latest -rc's.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ac0053fd
  6. 19 Apr, 2010 24 commits
  7. 18 Apr, 2010 1 commit
  8. 17 Apr, 2010 3 commits
  9. 16 Apr, 2010 1 commit