1. 21 9月, 2009 2 次提交
  2. 20 9月, 2009 1 次提交
  3. 19 9月, 2009 1 次提交
  4. 18 9月, 2009 1 次提交
  5. 16 9月, 2009 2 次提交
  6. 15 9月, 2009 1 次提交
  7. 14 9月, 2009 6 次提交
    • S
      tracing: make testing syscall events a separate configuration · 1f5a6b45
      Steven Rostedt 提交于
      Parag noticed that the number of event tests has increased tremendously:
      
      grep "Testing event" dmesg.31rc9 |wc -l
      100
      
      grep "Testing event" dmesg.31git |wc -l
      1172
      
      This is due to the testing of every syscall event when ftrace self
      test is enabled. This adds a bit more time to kernel boot up and can
      affect development by slowing down the time it takes between reboots.
      
      This option makes the testing of the syscall events into a separate
      config, to still be able to test most of ftrace internals at boot up
      but not have to wait for all the syscall events to be tested.
      
      The syscall event testing only tests the enabling and disabling of
      the trace point, since the syscalls are not executed. What really needs
      to be done is to somehow have a userspace tool test the syscall tracepoints
      as well.
      Reported-by: NParag Warudkar <parag.lkml@gmail.com>
      LKML-Reference: <f7848160909130815l3e768a30n3b28808bbe5c254b@mail.gmail.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      1f5a6b45
    • L
      tracing: remove some unused macros · 20a58a77
      Li Zefan 提交于
      - remove FTRACE_ENTRY_STRUCT_ONLY()
      - remove TRACE_XXX() macros
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      LKML-Reference: <4AADF6E6.3080606@cn.fujitsu.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      20a58a77
    • L
      ftrace: add compile-time check on F_printk() · 05ffa2d0
      Li Zefan 提交于
      Make sure F_printk() has corrent format and args, and make sure
      changes in F_STRUCT() won't break F_printk().
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      LKML-Reference: <4AADF6CC.1060809@cn.fujitsu.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      05ffa2d0
    • L
      tracing: fix F_printk() typos · c16de8fd
      Li Zefan 提交于
      I found some typos in F_printk(), so I wrote compile-time check
      for it, and triggered some compile errors and warnings.
      
      I've fixed them on x86_32, but I have no x86_64 in my hand, so there
      may still be some compile warnings on 64bits.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      LKML-Reference: <4AADF60B.5070407@cn.fujitsu.com>
      
      [ tested on x86_64, and works fine ]
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      c16de8fd
    • S
      tracing: add static to generated TRACE_EVENT functions · ec827c7e
      Steven Rostedt 提交于
      Some of the generated functions used in the TRACE_EVENT macros are
      not declared static, but they are not global.
      
      Discovered by sparse.
      Reported-by: NJaswinder Singh Rajput <jaswinder@kernel.org>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      ec827c7e
    • S
      ring-buffer: typecast cmpxchg to fix PowerPC warning · 08a40816
      Steven Rostedt 提交于
      The cmpxchg used by PowerPC does the following:
      
        ({									 \
           __typeof__(*(ptr)) _o_ = (o);					 \
           __typeof__(*(ptr)) _n_ = (n);					 \
           (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,		 \
      				    (unsigned long)_n_, sizeof(*(ptr))); \
        })
      
      This does a type check of *ptr to both o and n.
      
      Unfortunately, the code in ring-buffer.c assigns longs to pointers
      and pointers to longs and causes a warning on PowerPC:
      
      ring_buffer.c: In function 'rb_head_page_set':
      ring_buffer.c:704: warning: initialization makes pointer from integer without a cast
      ring_buffer.c:704: warning: initialization makes pointer from integer without a cast
      ring_buffer.c: In function 'rb_head_page_replace':
      ring_buffer.c:797: warning: initialization makes integer from pointer without a cast
      
      This patch adds the typecasts inside cmpxchg to annotate that a long is
      being cast to a pointer and a pointer is being casted to a long and this
      removes the PowerPC warnings.
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      08a40816
  8. 13 9月, 2009 8 次提交
  9. 12 9月, 2009 5 次提交
  10. 11 9月, 2009 2 次提交
    • S
      tracing: move tgid out of generic entry and into userstack · 48659d31
      Steven Rostedt 提交于
      The userstack trace required the recording of the tgid entry.
      Unfortunately, it was added to the generic entry where it wasted
      4 bytes of every entry and was only used by one entry.
      
      This patch moves it out of the generic field and moves it into the
      only user (userstack_entry).
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      48659d31
    • S
      tracing: add latency format to function_graph tracer · 49ff5903
      Steven Rostedt 提交于
      While debugging something with the function_graph tracer, I found the
      need to see the preempt count of the traces. Unfortunately, since
      the function graph tracer has its own output formatting, it does not
      honor the latency-format option.
      
      This patch makes the function_graph tracer honor the latency-format
      option, but still keeps control of the output. But now we have the
      same details that the latency-format supplies.
      
       # tracer: function_graph
       #
       #      _-----=> irqs-off
       #     / _----=> need-resched
       #    | / _---=> hardirq/softirq
       #    || / _--=> preempt-depth
       #    ||| /
       #    ||||
       # CPU||||  DURATION                  FUNCTION CALLS
       # |  ||||   |   |                     |   |   |   |
        3)  d..1  1.333 us    |        idle_cpu();
        3)  d.h1              |        tick_check_idle() {
        3)  d.h1  0.550 us    |          tick_check_oneshot_broadcast();
        3)  d.h1              |          tick_nohz_stop_idle() {
        3)  d.h1              |            ktime_get() {
        3)  d.h1              |              ktime_get_ts() {
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      49ff5903
  11. 10 9月, 2009 6 次提交
  12. 05 9月, 2009 5 次提交
    • S
      ring-buffer: only enable ring_buffer_swap_cpu when needed · 85bac32c
      Steven Rostedt 提交于
      Since the ability to swap the cpu buffers adds a small overhead to
      the recording of a trace, we only want to add it when needed.
      
      Only the irqsoff and preemptoff tracers use this feature, and both are
      not recommended for production kernels. This patch disables its use
      when neither irqsoff nor preemptoff is configured.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      85bac32c
    • S
      ring-buffer: check for swapped buffers in start of committing · 62f0b3eb
      Steven Rostedt 提交于
      Because the irqsoff tracer can swap an internal CPU buffer, it is possible
      that a swap happens between the start of the write and before the committing
      bit is set (the committing bit will disable swapping).
      
      This patch adds a check for this and will fail the write if it detects it.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      62f0b3eb
    • S
      tracing: report error in trace if we fail to swap latency buffer · e8165dbb
      Steven Rostedt 提交于
      The irqsoff tracer will fail to swap the cpu buffer with the max
      buffer if it preempts a commit. Instead of ignoring this, this patch
      makes the tracer report it if the last max latency failed due to preempting
      a current commit.
      
      The output of the latency tracer will look like this:
      
       # tracer: irqsoff
       #
       # irqsoff latency trace v1.1.5 on 2.6.31-rc5
       # --------------------------------------------------------------------
       # latency: 112 us, #1/1, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:4)
       #    -----------------
       #    | task: -4281 (uid:0 nice:0 policy:0 rt_prio:0)
       #    -----------------
       #  => started at: save_args
       #  => ended at:   __do_softirq
       #
       #
       #                  _------=> CPU#
       #                 / _-----=> irqs-off
       #                | / _----=> need-resched
       #                || / _---=> hardirq/softirq
       #                ||| / _--=> preempt-depth
       #                |||| /
       #                |||||     delay
       #  cmd     pid   ||||| time  |   caller
       #     \   /      |||||   \   |   /
          bash-4281    1d.s6  265us : update_max_tr_single: Failed to swap buffers due to commit in progress
      
      Note the latency time and the functions that disabled the irqs or preemption
      will still be listed.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      e8165dbb
    • S
      tracing: add trace_array_printk for internal tracers to use · 659372d3
      Steven Rostedt 提交于
      This patch adds a trace_array_printk to allow a tracer to use the
      trace_printk on its own trace array.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      659372d3
    • S
      tracing: pass around ring buffer instead of tracer · e77405ad
      Steven Rostedt 提交于
      The latency tracers (irqsoff and wakeup) can swap trace buffers
      on the fly. If an event is happening and has reserved data on one of
      the buffers, and the latency tracer swaps the global buffer with the
      max buffer, the result is that the event may commit the data to the
      wrong buffer.
      
      This patch changes the API to the trace recording to be recieve the
      buffer that was used to reserve a commit. Then this buffer can be passed
      in to the commit.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      e77405ad