1. 15 10月, 2009 1 次提交
    • I
      events: Harmonize event field names and print output names · 434a83c3
      Ingo Molnar 提交于
      Now that we can filter based on fields via perf record, people
      will start using filter expressions and will expect them to
      be obvious.
      
      The primary way to see which fields are available is by looking
      at the trace output, such as:
      
        gcc-18676 [000]   343.011728: irq_handler_entry: irq=0 handler=timer
        cc1-18677 [000]   343.012727: irq_handler_entry: irq=0 handler=timer
        cc1-18677 [000]   343.032692: irq_handler_entry: irq=0 handler=timer
        cc1-18677 [000]   343.033690: irq_handler_entry: irq=0 handler=timer
        cc1-18677 [000]   343.034687: irq_handler_entry: irq=0 handler=timer
        cc1-18677 [000]   343.035686: irq_handler_entry: irq=0 handler=timer
        cc1-18677 [000]   343.036684: irq_handler_entry: irq=0 handler=timer
      
      While 'irq==0' filters work, the 'handler==<x>' filter expression
      does not work:
      
        $ perf record -R -f -a -e irq:irq_handler_entry --filter handler=timer sleep 1
         Error: failed to set filter with 22 (Invalid argument)
      
      The problem is that while an 'irq' field exists and is recognized
      as a filter field - 'handler' does not exist - its name is 'name'
      in the output.
      
      To solve this, we need to synchronize the printout and the field
      names, wherever possible.
      
      In cases where the printout prints a non-field, we enclose
      that information in square brackets, such as:
      
        perf-1380  [013]   724.903505: softirq_exit: vec=9 [action=RCU]
        perf-1380  [013]   724.904482: softirq_exit: vec=1 [action=TIMER]
      
      This way users can use filter expressions more intuitively: all
      fields that show up as 'primary' (non-bracketed) information is
      filterable.
      
      This patch harmonizes the field names for all irq, bkl, power,
      sched and timer events.
      
      We might in fact think about dropping the print format bit of
      generic tracepoints altogether, and just print the fields that
      are being recorded.
      
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      434a83c3
  2. 29 8月, 2009 3 次提交
    • X
      itimers: Add tracepoints for itimer · 3f0a525e
      Xiao Guangrong 提交于
      Add tracepoints for all itimer variants: ITIMER_REAL, ITIMER_VIRTUAL
      and ITIMER_PROF.
      
      [ tglx: Fixed comments and made the output more readable, parseable
        	and consistent. Replaced pid_vnr by pid_nr because the hrtimer
        	callback can happen in any namespace ]
      Signed-off-by: NXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Zhaolei <zhaolei@cn.fujitsu.com>
      LKML-Reference: <4A7F8B6E.2010109@cn.fujitsu.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      3f0a525e
    • X
      hrtimer: Add tracepoint for hrtimers · c6a2a177
      Xiao Guangrong 提交于
      Add tracepoints which cover the life cycle of a hrtimer. The
      tracepoints are integrated with the already existing debug_object
      debug points as far as possible.
      
      [ tglx: Fixed comments, made output conistent, easier to read and
        	parse. Fixed output for 32bit archs which do not use the
        	scalar representation of ktime_t. Hand current time to
        	trace_hrtimer_expiry_entry instead of calling get_time()
        	inside of the trace assignment. ]
      Signed-off-by: NXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Zhaolei <zhaolei@cn.fujitsu.com>
      LKML-Reference: <4A7F8B2B.5020908@cn.fujitsu.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      c6a2a177
    • X
      timers: Add tracepoints for timer_list timers · 2b022e3d
      Xiao Guangrong 提交于
      Add tracepoints which cover the timer life cycle. The tracepoints are
      integrated with the already existing debug_object debug points as far
      as possible.
      
      Based on patches from 
      Mathieu: http://marc.info/?l=linux-kernel&m=123791201816247&w=2
      and 
      Anton: http://marc.info/?l=linux-kernel&m=124331396919301&w=2
      
      [ tglx: Fixed timeout value in timer_start tracepoint, massaged
        comments and made the printk's more readable ]
      Signed-off-by: NXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Zhaolei <zhaolei@cn.fujitsu.com>
      LKML-Reference: <4A7F8A9B.3040201@cn.fujitsu.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      2b022e3d