1. 17 10月, 2009 2 次提交
  2. 15 10月, 2009 6 次提交
  3. 14 10月, 2009 3 次提交
    • F
      tracing: Move syscalls metadata handling from arch to core · c44fc770
      Frederic Weisbecker 提交于
      Most of the syscalls metadata processing is done from arch.
      But these operations are mostly generic accross archs. Especially now
      that we have a common variable name that expresses the number of
      syscalls supported by an arch: NR_syscalls, the only remaining bits
      that need to reside in arch is the syscall nr to addr translation.
      
      v2: Compare syscalls symbols only after the "sys" prefix so that we
          avoid spurious mismatches with archs that have syscalls wrappers,
          in which case syscalls symbols have "SyS" prefixed aliases.
          (Reported by: Heiko Carstens)
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      c44fc770
    • J
      tracing: Enable records during the module load · 5cb084bb
      Jiri Olsa 提交于
      I was debuging some module using "function" and "function_graph"
      tracers and noticed, that if you load module after you enabled
      tracing, the module's hooks will convert only to NOP instructions.
      
      The attached patch enables modules' hooks if there's function trace
      allready on, thus allowing to trace module functions.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <20091013203425.896285120@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5cb084bb
    • J
      tracing: Support multiple pids in set_pid_ftrace file · 756d17ee
      jolsa@redhat.com 提交于
      Adding the possibility to set more than 1 pid in the set_pid_ftrace
      file, thus allowing to trace more than 1 independent processes.
      
      Usage:
      
       sh-4.0# echo 284 > ./set_ftrace_pid
       sh-4.0# cat ./set_ftrace_pid
       284
       sh-4.0# echo 1 >> ./set_ftrace_pid
       sh-4.0# echo 0 >> ./set_ftrace_pid
       sh-4.0# cat ./set_ftrace_pid
       swapper tasks
       1
       284
       sh-4.0# echo 4 > ./set_ftrace_pid
       sh-4.0# cat ./set_ftrace_pid
       4
       sh-4.0# echo > ./set_ftrace_pid
       sh-4.0# cat ./set_ftrace_pid
       no pid
       sh-4.0#
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091013203425.565454612@goodmis.org>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      756d17ee
  4. 13 10月, 2009 9 次提交
    • F
      tracing: Remove unused ftrace_trace_addr helper · bf7c5b43
      Frederic Weisbecker 提交于
      Remove the ftrace_trace_addr() function as only its off-case is
      implemented and there are no users of it currently.
      
      But we keep ftrace_graph_addr() off-case, in case someone come to use
      the function graph tracer to profit from top-level callers filtering.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      bf7c5b43
    • F
      tracing: Rename set_ftrace to set_bootup_ftrace · aef6f81b
      Frederic Weisbecker 提交于
      Do this rename because set_ftrace is too much generic and not enough
      self-explainable as a name.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      aef6f81b
    • L
      tracing/filters: Fix memory leak when setting a filter · 8ad80731
      Li Zefan 提交于
      Every time we set a filter, we leak memory allocated by
      postfix_append_operand() and postfix_append_op().
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: <stable@kernel.org> # for v2.6.31.x
      LKML-Reference: <4AD3D7D9.4070400@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8ad80731
    • M
      tracing/kprobes: Robustify fixed field names against variable field names conflicts · e93f4d85
      Masami Hiramatsu 提交于
      Rename probe-common fixed field names to harder conflictable names,
      because current 'ip', 'func', and other probe field names are easily in
      conflict with user-specified variable names.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091007222814.1684.407.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      e93f4d85
    • M
      tracing/kprobes: Avoid field name confliction · a703d946
      Masami Hiramatsu 提交于
      Check whether the argument name is in conflict with other field names
      while creating a kprobe through the debugfs interface.
      
      Changes in v3:
       - Check strcmp() == 0 instead of !strcmp().
      
      Changes in v2:
       - Add common_lock_depth to reserved name list.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091007222807.1684.26880.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      a703d946
    • M
      tracing/kprobes: Make special variable names more self-explainable · 2e06ff63
      Masami Hiramatsu 提交于
      Rename special variables to more self-explainable names as below:
      - $rv to $retval
      - $sa to $stack
      - $aN to $argN
      - $sN to $stackN
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091007222759.1684.3319.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      2e06ff63
    • S
      ftrace: add kernel command line graph function filtering · 369bc18f
      Stefan Assmann 提交于
      Add a command line parameter to allow limiting the function graphs
      that are traced on boot up from the given top-level callers , when
      ftrace=function_graph is specified.
      
      This patch adds the following command line option:
      ftrace_graph_filter=function-list
      
      Where function-list is a comma separated list of functions to filter.
      
      [fweisbec@gmail.com: picked the documentation changes from the v2 patch]
      Signed-off-by: NStefan Assmann <sassmann@redhat.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <4AD2DEB9.2@redhat.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      369bc18f
    • M
      tracing/kprobes: Remove '$ra' special variable · 99329c44
      Masami Hiramatsu 提交于
      Remove '$ra' (return address) because it is already shown at the head of
      each entry.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091007222748.1684.12711.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      99329c44
    • M
      tracing/kprobes: Add $ prefix to special variables · 405b2651
      Masami Hiramatsu 提交于
      Add $ prefix to the special variables(e.g. sa, rv) of kprobe-tracer.
      This resolves consistency issues between kprobe_events and perf-kprobe.
      
      The main goal is to avoid conflicts between local variable names of
      probed functions, used by perf probe, and special variables used
      in the kprobe event creation interface (stack values, etc...) and
      also available from perf probe.
      
      ie: we don't want rv (return value) to conflict with a local variable
      named rv in a probed function.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      LKML-Reference: <20091007222740.1684.91170.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      405b2651
  5. 09 10月, 2009 1 次提交
  6. 08 10月, 2009 5 次提交
  7. 06 10月, 2009 3 次提交
  8. 05 10月, 2009 2 次提交
  9. 03 10月, 2009 2 次提交
  10. 02 10月, 2009 2 次提交
    • J
      Add a tracepoint for block request remapping · b0da3f0d
      Jun'ichi Nomura 提交于
      Since 2.6.31 now has request-based device-mapper, it's useful to have
      a tracepoint for request-remapping as well as bio-remapping.
      This patch adds a tracepoint for request-remapping, trace_block_rq_remap().
      Signed-off-by: NKiyoshi Ueda <k-ueda@ct.jp.nec.com>
      Signed-off-by: NJun'ichi Nomura <j-nomura@ce.jp.nec.com>
      Cc: Alasdair G Kergon <agk@redhat.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      b0da3f0d
    • Z
      Add missing blk_trace_remove_sysfs to be in pair with blk_trace_init_sysfs · 48c0d4d4
      Zdenek Kabelac 提交于
      Add missing blk_trace_remove_sysfs to be in pair with blk_trace_init_sysfs
      introduced in commit 1d54ad6d.
      Release kobject also in case the request_fn is NULL.
      
      Problem was noticed via kmemleak backtrace when some sysfs entries were
      note properly destroyed during  device removal:
      
      unreferenced object 0xffff88001aa76640 (size 80):
        comm "lvcreate", pid 2120, jiffies 4294885144
        hex dump (first 32 bytes):
          01 00 00 00 00 00 00 00 f0 65 a7 1a 00 88 ff ff  .........e......
          90 66 a7 1a 00 88 ff ff 86 1d 53 81 ff ff ff ff  .f........S.....
        backtrace:
          [<ffffffff813f9cc6>] kmemleak_alloc+0x26/0x60
          [<ffffffff8111d693>] kmem_cache_alloc+0x133/0x1c0
          [<ffffffff81195891>] sysfs_new_dirent+0x41/0x120
          [<ffffffff81194b0c>] sysfs_add_file_mode+0x3c/0xb0
          [<ffffffff81197c81>] internal_create_group+0xc1/0x1a0
          [<ffffffff81197d93>] sysfs_create_group+0x13/0x20
          [<ffffffff810d8004>] blk_trace_init_sysfs+0x14/0x20
          [<ffffffff8123f45c>] blk_register_queue+0x3c/0xf0
          [<ffffffff812447e4>] add_disk+0x94/0x160
          [<ffffffffa00d8b08>] dm_create+0x598/0x6e0 [dm_mod]
          [<ffffffffa00de951>] dev_create+0x51/0x350 [dm_mod]
          [<ffffffffa00de823>] ctl_ioctl+0x1a3/0x240 [dm_mod]
          [<ffffffffa00de8f2>] dm_compat_ctl_ioctl+0x12/0x20 [dm_mod]
          [<ffffffff81177bfd>] compat_sys_ioctl+0xcd/0x4f0
          [<ffffffff81036ed8>] sysenter_dispatch+0x7/0x2c
          [<ffffffffffffffff>] 0xffffffffffffffff
      Signed-off-by: NZdenek Kabelac <zkabelac@redhat.com>
      Reviewed-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      48c0d4d4
  11. 01 10月, 2009 2 次提交
  12. 25 9月, 2009 2 次提交
    • F
      tracing/filters: Unify the regex parsing helpers · 3f6fe06d
      Frederic Weisbecker 提交于
      The filter code has stolen the regex parsing function from ftrace to
      get the regex support.
      We have duplicated this code, so factorize it in the filter area and
      make it generally available, as the filter code is the most suited to
      host this feature.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      3f6fe06d
    • F
      tracing/filters: Provide basic regex support · 1889d209
      Frederic Weisbecker 提交于
      This patch provides basic support for regular expressions in filters.
      
      It supports the following types of regexp:
      
      - *match_beginning
      - *match_middle*
      - match_end*
      - !don't match
      
      Example:
      	cd /debug/tracing/events/bkl/lock_kernel
      	echo 'file == "*reiserfs*"' > filter
      	echo 1 > enable
      
                 gedit-4941  [000]   457.735437: lock_kernel: depth: 0, fs/reiserfs/namei.c:334 reiserfs_lookup()
           sync_supers-227   [001]   461.379985: lock_kernel: depth: 0, fs/reiserfs/super.c:69 reiserfs_sync_fs()
           sync_supers-227   [000]   461.383096: lock_kernel: depth: 0, fs/reiserfs/journal.c:1069 flush_commit_list()
            reiserfs/1-1369  [001]   461.479885: lock_kernel: depth: 0, fs/reiserfs/journal.c:3509 flush_async_commits()
      
      Every string is now handled as a regexp in the filter framework, which
      helps to factorize the code for handling both simple strings and
      regexp comparisons.
      
      (The regexp parsing code has been wildly cherry picked from ftrace.c
      written by Steve.)
      
      v2: Simplify the whole and drop the filter_regex file
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      1889d209
  13. 24 9月, 2009 1 次提交