1. 15 4月, 2010 1 次提交
    • M
      perf probe: Support argument name · 48481938
      Masami Hiramatsu 提交于
      Set given names to event arguments. The syntax is same as kprobe-tracer,
      you can add 'NAME=' right before each argument.
      
      e.g.
        ./perf probe vfs_read foo=file
      
       then, 'foo' is set to the argument name as below.
      
        ./perf probe -l
        probe:vfs_read       (on vfs_read@linux-2.6-tip/fs/read_write.c with foo)
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20100412171653.3790.74624.stgit@localhost6.localdomain6>
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      48481938
  2. 03 4月, 2010 3 次提交
    • M
      perf probe: Fix to close dwarf when failing to analyze it · 75ec5a24
      Masami Hiramatsu 提交于
      Fix to close libdw routine when failing to analyze it in
      find_perf_probe_point().
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      LKML-Reference: <20100402165059.23551.95587.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      75ec5a24
    • M
      perf probe: Correct error message for non-structure type · 12e5a7ae
      Masami Hiramatsu 提交于
      perf probe outputs incorrect error message when it is called with
      non-existent field on a non-data structure local variable.
      
      <Before>
       # perf probe vfs_read 'count.hoge'
        Fatal: Structure on a register is not supported yet.
       # perf probe vfs_read 'count->hoge'
        Fatal: Semantic error: hoge must be referred by '.'
      
      This corrects the messsage.
      
      <After>
       # perf probe vfs_read 'count.hoge'
        Fatal: count is not a data structure.
       # perf probe vfs_read 'count->hoge'
        Fatal: count is not a data structure.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      LKML-Reference: <20100402165052.23551.75866.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      12e5a7ae
    • M
      perf probe: Fix not to return non-matched file · c9e38582
      Masami Hiramatsu 提交于
      Fix cu_find_realpath() not to return the last file path
      if that is not matched to input pattern.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      LKML-Reference: <20100402165045.23551.47780.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c9e38582
  3. 17 3月, 2010 6 次提交
    • M
      perf probe: Add data structure member access support · 7df2f329
      Masami Hiramatsu 提交于
      Support accessing members in the data structures. With this,
      perf-probe accepts data-structure members(IOW, it now accepts
      dot '.' and arrow '->' operators) as probe arguemnts.
      
      e.g.
      
       ./perf probe --add 'schedule:44 rq->curr'
      
       ./perf probe --add 'vfs_read file->f_op->read file->f_path.dentry'
      
      Note that '>' can be interpreted as redirection in command-line.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20100316220626.32050.57552.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7df2f329
    • M
      perf probe: List probes with line number and file name · fb1587d8
      Masami Hiramatsu 提交于
      Improve --list to show current exist probes with line number and
      file name. This enables user easily to check which line is
      already probed.
      
      for example:
      
       ./perf probe --list
       probe:vfs_read       (on vfs_read:8@linux-2.6-tip/fs/read_write.c)
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20100316220619.32050.48702.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fb1587d8
    • M
      perf probe: Introduce kprobe_trace_event and perf_probe_event · 4235b045
      Masami Hiramatsu 提交于
      Introduce kprobe_trace_event and perf_probe_event and replace
      old probe_point structure with it. probe_point structure is
      not enough flexible nor extensible. New data structures
      will help implementing further features.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20100316220612.32050.33806.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4235b045
    • M
      perf probe: Introduce die_find_child() function · 016f262e
      Masami Hiramatsu 提交于
      Introduce die_find_child() function to integrate DIE-tree
      searching functions.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20100316220558.32050.7905.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      016f262e
    • M
      perf probe: Rename some die_get_* functions · 95a3e4c4
      Masami Hiramatsu 提交于
      Rename die_get_real_subprogram and die_get_inlinefunc to
      die_find_real_subprogram and die_find_inlinefunc respectively,
      because these functions search its children. After that,
      'die_get_' means getting a property of that die, and
      'die_find_' means searching DIE-tree to get an appropriate
      child die.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20100316220551.32050.36181.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      95a3e4c4
    • M
      perf probe: Use wrapper functions · 31facc5f
      Masami Hiramatsu 提交于
      Use wrapped functions as much as possible, to check out of
      memory conditions in perf probe.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20100316220530.32050.53951.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      31facc5f
  4. 16 3月, 2010 2 次提交
  5. 13 3月, 2010 1 次提交
    • M
      perf probe: Fix probe_point buffer overrun · 594087a0
      Masami Hiramatsu 提交于
      Fix probe_point array-size overrun problem. In some cases (e.g.
      inline function), one user-specified probe-point can be
      translated to many probe address, and it overruns pre-defined
      array-size. This also removes redundant MAX_PROBES macro
      definition.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: <stable@kernel.org>
      LKML-Reference: <20100312232217.2017.45017.stgit@localhost6.localdomain6>
      [ Note that only root can create new probes. Eventually we should remove
        the MAX_PROBES limit, but that is a larger patch not eligible to
        perf/urgent treatment. ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      594087a0
  6. 10 3月, 2010 1 次提交
  7. 26 2月, 2010 6 次提交
    • M
      perf probe: Add lazy line matching support · 2a9c8c36
      Masami Hiramatsu 提交于
      Add lazy line matching support for specifying new probes.
      This also changes the syntax of perf probe a bit. Now
      perf probe accepts one of below probe event definitions.
      
      1) Define event based on function name
       [EVENT=]FUNC[@src][:RLN|+OFF|%return|;PTN] [ARG ...]
      
      2) Define event based on source file with line number
       [EVENT=]SRC:ALN [ARG ...]
      
      3) Define event based on source file with lazy pattern
       [EVENT=]SRC;PTN [ARG ...]
      
      - New lazy matching pattern(PTN) follows ';' (semicolon). And it
        must be put the end of the definition.
      - So, @src is no longer the part which must be put at the end
        of the definition.
      
      Note that ';' (semicolon) can be interpreted as the end of
      a command by the shell. This means that you need to quote it.
      (anyway you will need to quote the lazy pattern itself too,
      because it may contains other sensitive characters, like
      '[',']' etc.).
      
      Lazy matching
      -------------
      The lazy line matching is similar to glob matching except
      ignoring spaces in both of pattern and target.
      
      e.g.
      'a=*' can matches 'a=b', 'a = b', 'a == b' and so on.
      
      This provides some sort of flexibility and robustness to
      probe point definitions against minor code changes.
      (for example, actual 10th line of schedule() can be changed
       easily by modifying schedule(), but the same line matching
       'rq=cpu_rq*' may still exist.)
      
      Changes in v3:
       - Cast Dwarf_Addr to uintmax_t for printf-formats.
      
      Changes in v2:
       - Cast Dwarf_Addr to unsigned long long for printf-formats.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      LKML-Reference: <20100225133611.6725.45078.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2a9c8c36
    • M
      perf probe: Check function address range strictly in line finder · 161a26b0
      Masami Hiramatsu 提交于
      Check (inlined) function address range strictly for
      improving output of probe-able lines of inline functions.
      
      Without this change, perf probe --line <function> sometimes
      showed other inline function bodies too, because it didn't
      filter out inlined functions.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Ulrich Drepper <drepper@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      LKML-Reference: <20100225133557.6725.20697.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      161a26b0
    • M
      perf probe: Use libdw callback routines · e92b85e1
      Masami Hiramatsu 提交于
      Use libdw callback functions aggressively, and remove
      local tree-search API. This change simplifies the code.
      
      Changes in v3:
       - Cast Dwarf_Addr to uintmax_t for printf-formats.
      
      Changes in v2:
       - Cast Dwarf_Addr to unsigned long long for printf-formats.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Ulrich Drepper <drepper@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      LKML-Reference: <20100225133549.6725.81499.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e92b85e1
    • M
      perf probe: Use elfutils-libdw for analyzing debuginfo · 804b3606
      Masami Hiramatsu 提交于
      Newer gcc introduces newer & richer debuginfo, and only libdw
      in elfutils project can support it. So perf probe moves onto
      elfutils-libdw from libdwarf.
      
      Changes in v3:
       - Cast Dwarf_Addr/Dwarf_Word to uintmax_t for printf-formats.
       - Recover a sign-prefix which was removed in v2 by mistake.
      
      Changes in v2:
       - Fix a type-casting bug in Makefile.
       - Cast Dwarf_Addr/Dwarf_Word to unsigned long long for printf-formats.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Ulrich Drepper <drepper@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      LKML-Reference: <20100225133542.6725.34724.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      804b3606
    • M
      perf probe: Rename probe finder functions · 81cb8aa3
      Masami Hiramatsu 提交于
      Rename *_probepoint to *_probe_point, for nothing
      but a cosmetic reason.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      LKML-Reference: <20100225133534.6725.52615.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      81cb8aa3
    • M
      perf probe: Fix bugs in line range finder · 3cb8bc6a
      Masami Hiramatsu 提交于
      Fix find_line_range_by_line() to init line_list and remove
      misconseptional found marking which should be done when
      real lines are found (if there is no lines probe-able,
      find_line_range() should return 0).
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      LKML-Reference: <20100225133527.6725.52418.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3cb8bc6a
  8. 13 1月, 2010 2 次提交
    • M
      perf probe: Support --line option to show probable source-code lines · 631c9def
      Masami Hiramatsu 提交于
      Add --line option to support showing probable source-code lines.
      
        perf probe --line SRC:LN[-LN|+NUM]
         or
        perf probe --line FUNC[:LN[-LN|+NUM]]
      
      This option shows source-code with line number if the line can
      be probed. Lines without line number (and blue color) means that
      the line can not be probed, because debuginfo doesn't have the
      information of those lines.
      
      The argument specifies the range of lines, "source.c:100-120"
      shows lines between 100th to l20th in source.c file. And
      "func:10+20" shows 20 lines from 10th line of func function.
      
      e.g.
       # ./perf probe --line kernel/sched.c:1080
       <kernel/sched.c:1080>
                *
                * called with rq->lock held and irqs disabled
                */
               static void hrtick_start(struct rq *rq, u64 delay)
               {
                      struct hrtimer *timer = &rq->hrtick_timer;
         1086         ktime_t time = ktime_add_ns(timer->base->get_time(), delay);
      
                      hrtimer_set_expires(timer, time);
      
         1090         if (rq == this_rq()) {
         1091                 hrtimer_restart(timer);
         1092         } else if (!rq->hrtick_csd_pending) {
         1093                 __smp_call_function_single(cpu_of(rq), &rq->hrtick_csd,
         1094                 rq->hrtick_csd_pending = 1;
      
      If you specifying function name, this shows function-relative
      line number.
      
       # ./perf probe --line schedule
       <schedule:0>
               asmlinkage void __sched schedule(void)
            1  {
                      struct task_struct *prev, *next;
                      unsigned long *switch_count;
                      struct rq *rq;
                      int cpu;
      
               need_resched:
                      preempt_disable();
            9         cpu = smp_processor_id();
           10         rq = cpu_rq(cpu);
           11         rcu_sched_qs(cpu);
           12         prev = rq->curr;
           13         switch_count = &prev->nivcsw;
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <20100106144534.27218.77939.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      631c9def
    • M
      perf probe: Remove newline from die() · bbaa46fa
      Masami Hiramatsu 提交于
      Remove newline from die(), because it is automatically added.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <20100105224703.19431.42475.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bbaa46fa
  9. 16 12月, 2009 1 次提交
    • M
      perf probe: Show need-dwarf message only if it is really needed · 411edfe5
      Masami Hiramatsu 提交于
      Show need-dwarf message only if the probe is really requires
      debuginfo analysis. This also use pr_debug for debugging message
      instead of pr_warning.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091215153135.17436.99052.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      411edfe5
  10. 08 12月, 2009 1 次提交
  11. 04 11月, 2009 2 次提交
    • M
      perf/probes: Fall back to non-dwarf if possible · a225a1d9
      Masami Hiramatsu 提交于
      Fall back to non-dwarf probe point if the probe definition may
      not need dwarf analysis, when perf can't find vmlinux/debuginfo.
      This might skip some inlined code of target function.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091104001229.3454.63987.stgit@harusame>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a225a1d9
    • M
      perf/probes: Improve error messages · a7f4328b
      Masami Hiramatsu 提交于
      Improve error messages in perf-probe so that users can figure
      out problems easily.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091104001221.3454.52030.stgit@harusame>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a7f4328b
  12. 29 10月, 2009 3 次提交
    • M
      perf/probes: Support function entry relative line number · b0ef0732
      Masami Hiramatsu 提交于
      Add function-entry relative line number specifying support to
      perf-probe. This allows users to define probes by line number
      from entry of the function.
      
       e.g.
      
        perf probe schedule:16
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204319.30545.30678.stgit@harusame>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b0ef0732
    • M
      perf/probes: Improve probe point syntax of perf-probe · 253977b0
      Masami Hiramatsu 提交于
      This changes probe point syntax of perf-probe as below
      
       <SRC>[:ABS_LN] [ARGS]
       or
       <FUNC>[+OFFS|%return][@src] [ARGS]
      
      And event name and event group name are automatically
      generated based on probe-symbol and offset as below.
      
       perfprobes/SYMBOL_OFFSET[_NUM]
      
      Where SYMBOL is the probing symbol and OFFSET is
      the byte offset from the symbol.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204310.30545.84984.stgit@harusame>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      253977b0
    • M
      perf/probes: Exit searching after finding target function · 8030c5f5
      Masami Hiramatsu 提交于
      Exit searching after finding real (not-inlined) function,
      because there should be no same symbol in that CU.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      LKML-Reference: <20091027204252.30545.19251.stgit@harusame>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8030c5f5
  13. 23 10月, 2009 1 次提交
  14. 17 10月, 2009 3 次提交
    • M
      perf: Add DIE_IF() macro for error checking · 9769833b
      Masami Hiramatsu 提交于
      Add DIE_IF() macro and replace ERR_IF() with it, and use
      linux/stringify.h.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20091017000818.16556.82452.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9769833b
    • M
      perf: Use eprintf() for debug messages in perf-probe · 89c69c0e
      Masami Hiramatsu 提交于
      Replace debug() macro with eprintf() and add -v option for
      showing those messages in perf-probe.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20091017000810.16556.38013.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      89c69c0e
    • M
      perf: Use die() for error cases in perf-probe · 074fc0e4
      Masami Hiramatsu 提交于
      Use die() for exiting perf-probe with errors. This replaces
      perror_exit(), msg_exit() and fprintf()+exit() with die(), and
      uses die() in semantic_error().
      
      This also renames 'die' local variables to 'dw_die' for avoiding
      name confliction.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20091017000801.16556.46866.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      074fc0e4
  15. 13 10月, 2009 1 次提交
    • M
      perf: Add perf probe subcommand, a kprobe-event setup helper · 4ea42b18
      Masami Hiramatsu 提交于
      Add perf probe subcommand that implements a kprobe-event setup helper
      to the perf command.
      This allows user to define kprobe events using C expressions (C line
      numbers, C function names, and C local variables).
      
      Usage
      -----
       perf probe [<options>] -P 'PROBEDEF' [-P 'PROBEDEF' ...]
      
          -k, --vmlinux <file>  vmlinux/module pathname
          -P, --probe <p|r:[GRP/]NAME FUNC[+OFFS][@src]|@src:LINE [ARG ...]>
                                probe point definition, where
      		p:	kprobe probe
      		r:	kretprobe probe
      		GRP:	Group name (optional)
      		NAME:	Event name
      		FUNC:	Function name
      		OFFS:	Offset from function entry (in byte)
      		SRC:	Source code path
      		LINE:	Line number
      		ARG:	Probe argument (local variable name or
      			kprobe-tracer argument format is supported.)
      
      Changes in v4:
       - Add _GNU_SOURCE macro for strndup().
      
      Changes in v3:
       - Remove -r option because perf always be used for online kernel.
       - Check malloc/calloc results.
      
      Changes in v2:
       - Check synthesized string length.
       - Rename perf kprobe to perf probe.
       - Use spaces for separator and update usage comment.
       - Check error paths in parse_probepoint().
       - Check optimized-out variables.
      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: <20091008211737.29299.14784.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      4ea42b18