1. 16 12月, 2009 20 次提交
    • A
      perf tools: Move hist entries printing routines from perf report · 4ecf84d0
      Arnaldo Carvalho de Melo 提交于
      Will be used in other tools such as 'perf diff'.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260973631-28035-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4ecf84d0
    • A
      perf report: Generalize perf_session__fprintf_hists() · d599db3f
      Arnaldo Carvalho de Melo 提交于
      Pull it out of builtin-report - further changes will be made and it
      will then be reusable in 'perf diff' as well.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260914682-29652-4-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d599db3f
    • A
      perf symbols: Move symbol filtering to event__preprocess_sample() · c410a338
      Arnaldo Carvalho de Melo 提交于
      So that --dsos, --comm, --symbols can bem used in more tools,
      like in perf diff:
      
      $ perf record -f find / > /dev/null
      $ perf record -f find / > /dev/null
      $ perf diff --dsos /lib64/libc-2.10.1.so | head -5
         1        +22392124     /lib64/libc-2.10.1.so   _IO_vfprintf_internal
         2         +6410655     /lib64/libc-2.10.1.so   __GI_memmove
         3    +1   +9192692     /lib64/libc-2.10.1.so   _int_malloc
         4    -1  -15158605     /lib64/libc-2.10.1.so   _int_free
         5           +45669     /lib64/libc-2.10.1.so   _IO_new_file_xsputn
      $
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260914682-29652-3-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c410a338
    • A
      perf symbols: Adopt the strlists for dso, comm · 655000e7
      Arnaldo Carvalho de Melo 提交于
      Will be used in perf diff too.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260914682-29652-2-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      655000e7
    • A
      perf symbols: Make symbol_conf global · 75be6cf4
      Arnaldo Carvalho de Melo 提交于
      This simplifies a lot of functions, less stuff to be done by
      tool writers.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260914682-29652-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      75be6cf4
    • M
      perf probe: Fix to show which probe point is not found · 7ef17aaf
      Masami Hiramatsu 提交于
      Fix perf probe to show which probe point is not found.
      With out this patch, it shows just "No probe point found."
      This doesn't help users if they specify several probes.
      e.g.
      
       # perf probe -f --add schedule --add test
        Fatal: No probe point found.
      
      This patch makes error message more helpful as below.
      
       # perf probe --add schedule --add test
        Fatal: Probe point 'test' not found. - probe not added.
      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: <20091215153247.17436.49068.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7ef17aaf
    • M
      perf probe: Check symbols in symtab/kallsyms · 62bdc1b3
      Masami Hiramatsu 提交于
      Check symbols in symtab/kallsyms when no debuginfo
      is available.
      
      e.g.
      
       # perf probe test
        Fatal: Kernel symbol 'test' not found - probe not added.
      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: <20091215153239.17436.55034.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      62bdc1b3
    • M
      perf probe: Check build-id of vmlinux · a128168d
      Masami Hiramatsu 提交于
      Check build-id of vmlinux by using functions in symbol.c.
      This also exposes map__load() for getting vmlinux path,
      and removes vmlinux path list in builtin-probe.c,
      because symbol.c already has that. Checking build-id
      prevents users to open old or different debuginfo from
      current running kernel.
      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: <20091215153232.17436.45539.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a128168d
    • M
      perf probe: Reject second attempt of adding same-name event · d761b08b
      Masami Hiramatsu 提交于
      Reject second attempt of adding same-name event. This patch
      also provides --force option which allows user to add additional
      probe events on the same-name event.
      
      e.g.
      (the first attempt : success)
       ./perf probe schedule
       Added new event:
         probe:schedule                           (on schedule+0)
      
      (the second attempt : failure)
       ./perf probe schedule:11
       Error: event "schedule" already exists. (Use -f to force duplicates.)
         Fatal: Can't add new event.
      
      (the second attempt with -f : successfully added)
       ./perf probe -f schedule:11
       Added new event:
         probe:schedule_1                         (on schedule+45)
      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: <20091215153225.17436.15166.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d761b08b
    • M
      perf probe: Support event name for --add option · af663d75
      Masami Hiramatsu 提交于
      Support event name syntax for --add option. This allows
      users to specify event name for each new event.
      
      The --add syntax is:
       perf probe --add '[EVENT=]SRC:LINE ARGS'
      or
       perf probe --add '[EVENT=]FUNC[+OFFS|%return|:RLN][@src] ARGS'
      
      e.g.
      
       ./perf probe --add myprobe1=schedule
      
      Note: currently group name is not supported yet, because it
      can cause name-space confliction with other tracepoint/
      hw-breakpoint events.
      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: <20091215153218.17436.84675.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      af663d75
    • M
      perf probe: Add glob matching support on --del · bbbb521b
      Masami Hiramatsu 提交于
      Add glob-expression matching support on --del option.
      You can use wildcards for specifying deleting events.
      e.g.
      
       Clear all probe events:
      
       # perf probe --del '*'
      
       Clear probes on schedule():
      
       # perf probe --del 'schedule*'
      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: <20091215153210.17436.12327.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bbbb521b
    • M
      perf probe: Use strlist__for_each macros in probe-event.c · adf365f4
      Masami Hiramatsu 提交于
      Use strlist__for_each macros instead of using strlist__entry()
      and index variable.
      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: <20091215153203.17436.52039.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      adf365f4
    • M
      perf tools: Add for_each macros for strlist · abf5ef72
      Masami Hiramatsu 提交于
      Add for_each iteration macros for strlist. This patch
      introduces strlist__for_each() and strlist__for_each_safe(),
      both are similar to list_for_each() and list_for_each_safe().
      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: <20091215153156.17436.49157.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      abf5ef72
    • M
      perf probe: Fix --del to update current event list · 3e340590
      Masami Hiramatsu 提交于
      Fix --del option to update current existing event list
      after perf probe deleted an event.
      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: <20091215153149.17436.61265.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3e340590
    • M
      perf probe: Fix --del to show info instead of warning · f6bbff77
      Masami Hiramatsu 提交于
      Fix --del option to show info message instead of warning
      if failing to find specified event.
      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: <20091215153142.17436.7793.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f6bbff77
    • 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
    • M
      perf probe: Check hyphen only argument · ce11a603
      Masami Hiramatsu 提交于
      Check hyphen only command argument, because perf-probe doesn't
      support event recording feature yet.
      
      e.g.
      
       # perf probe -
        Error: '-' is not supported.
      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: <20091215153128.17436.9266.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ce11a603
    • M
      perf probe: Check the result of e_snprintf() · 7e990a51
      Masami Hiramatsu 提交于
      Fix show_perf_probe_event() to check the result of e_snprintf().
      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: <20091215153121.17436.34674.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7e990a51
    • M
      perf probe: Cleanup struct session in builtin-probe.c · fac13fd5
      Masami Hiramatsu 提交于
      Clean up struct session in builtin-probe.c, including
      change need_dwarf to bool and move listing flag into
      struct session as list_events flag.
      
      This also changes parse_perf_probe_event() interface
      due to code readability.
      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: <20091215153114.17436.77000.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fac13fd5
    • P
      perf_events: Fix perf_event_attr layout · f13c12c6
      Peter Zijlstra 提交于
      The miss-alignment of bp_addr created a 32bit hole, causing
      different structure packings on 32 and 64 bit machines.
      
      Fix that by moving __reserve_2 into that hole.
      
      Further, remove the useless struct and redundant __bp_reserve
      muck.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1260902591.8023.781.camel@laptop>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f13c12c6
  2. 15 12月, 2009 16 次提交
    • A
      perf diff: Fix documentation · cdccc690
      Arnaldo Carvalho de Melo 提交于
      Add a newline do fix this problem:
      
      ERROR: perf-diff.txt: line 31: closing [blockdef-listing]
      delimiter expected
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260882082-10007-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cdccc690
    • I
      perf diff: Improve the help text · d30531c6
      Ingo Molnar 提交于
      Fix the short line displayed by 'perf' and also fix some other
      details in the longer text.
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d30531c6
    • P
      perf_event: Fix incorrect range check on cpu number · 0f624e7e
      Paul Mackerras 提交于
      It is quite legitimate for CPUs to be numbered sparsely, meaning
      that it possible for an online CPU to have a number which is
      greater than the total count of possible CPUs.
      
      Currently find_get_context() has a sanity check on the cpu
      number where it checks it against num_possible_cpus().  This
      test can fail for a legitimate cpu number if the
      cpu_possible_mask is sparsely populated.
      
      This fixes the problem by checking the CPU number against
      nr_cpumask_bits instead, since that is the appropriate check to
      ensure that the cpu number is same to pass to cpu_isset()
      subsequently.
      Reported-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Tested-by: NMichael Neuling <mikey@neuling.org>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: <stable@kernel.org>
      LKML-Reference: <20091215084032.GA18661@brick.ozlabs.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0f624e7e
    • T
      perf trace/scripting: Update Documentation · a6005123
      Tom Zanussi 提交于
      Update the perf-trace page with new and missing options and
      remove some unused ones.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      LKML-Reference: <1260867220-15699-7-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a6005123
    • T
      perf trace/scripting: Add 'record' and 'report' options · 3875294f
      Tom Zanussi 提交于
      Allow scripts to be recorded/executed by simply specifying the
      script root name (the script name minus extension) along with
      'record' or 'report' to 'perf trace'.
      
      The script names shown by 'perf trace -l' can be directly used
      to run the command-line contained within the corresponding
      '-record' and '-report' versions of scripts in the scripts/*/bin
      directories.
      
      For example, to record the trace data needed to run the
      wakeup-latency.pl script, the user can easily find the name of
      the corresponding script from the script list and invoke it
      using 'perf trace record', without having to remember the
      details of how to do the same thing using the lower-level perf
      trace command-line options:
      
      root@tropicana:~# perf trace -l
      List of available trace scripts:
        workqueue-stats                      workqueue stats (ins/exe/create/destroy)
        wakeup-latency                       system-wide min/max/avg wakeup latency
        rw-by-file <comm>                    r/w activity for a program, by file
        check-perf-trace                     useless but exhaustive test script
        rw-by-pid                            system-wide r/w activity
      
      root@tropicana:~# perf trace record wakeup-latency
      ^C[ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.296 MB perf.data (~12931
      samples) ]
      
      To run the wakeup-latency.pl script using the captured data,
      change 'record' to 'report' in the command-line:
      
      root@tropicana:~# perf trace report wakeup-latency
      
      wakeup_latency stats:
      
      total_wakeups: 65
      avg_wakeup_latency (ns): 22417
      min_wakeup_latency (ns): 3470
      max_wakeup_latency (ns): 223311
      
      perf trace Perl script stopped
      
      If the script takes options, thay can be simply added to the end
      of the 'report' invocation:
      
      root@tropicana:~# perf trace record rw-by-file
      ^C[ perf record: Woken up 2 times to write data ]
      [ perf record: Captured and wrote 0.782 MB perf.data (~34171
      samples) ]
      
      root@tropicana:~# perf trace report rw-by-file perf
      
      file read counts for perf:
      
          fd     # reads  bytes_requested
      ------  ----------  -----------
         122        1934     1980416
         120           1          32
      
      file write counts for perf:
      
          fd    # writes  bytes_written
      ------  ----------  -----------
           3        4006      280568
      
      perf trace Perl script stopped
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      LKML-Reference: <1260867220-15699-6-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3875294f
    • T
      perf trace/scripting: List available scripts · 4b9c0c59
      Tom Zanussi 提交于
      Lists the available perf trace scripts, one per line e.g.:
      
      root@tropicana:~# perf trace -l
      List of available trace scripts:
        workqueue-stats                      workqueue stats (ins/exe/create/destroy)
        wakeup-latency                       system-wide min/max/avg wakeup latency
        rw-by-file <comm>                    r/w activity for a program, by file
        check-perf-trace                     useless but exhaustive test script
        rw-by-pid                            system-wide r/w activity
      
      To be consistent with the other listing options in perf, the
      current latency trace option was changed to '-L', and '-l' is
      now used to access the script listing as:
      
      To create the list, it searches each scripts/*/bin directory for
      files ending with "-report" and reads information found in
      certain comment lines contained in those shell scripts:
      
        - if the comment line starts with "description:", the rest of the
          line is used as a 'half-line' description.  To keep each line in
          the list to a single line, the description should be limited to 40
          characters (the rest of the line contains the script name and
          args)
      
        - if the comment line starts with "args:", the rest of the line
          names the args the script supports.  Required args should be
          surrounded by <> brackets, optional args by [] brackets.
      
      The current scripts in scripts/perl/bin have also been updated
      with description: and args: comments.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      LKML-Reference: <1260867220-15699-5-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4b9c0c59
    • T
      perf trace/scripting: Check return val of perl_run() · 8f11d85a
      Tom Zanussi 提交于
      The return value from perl_run() is currently ignored, but it
      should be checked and used to exit perf if there are problems
      loading the script.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      LKML-Reference: <1260867220-15699-4-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8f11d85a
    • T
      perf trace/scripting: Don't install unneeded files · a3a7cb7b
      Tom Zanussi 提交于
      README and Makefile.PL don't need to be installed for Perl
      run-time support.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      LKML-Reference: <1260867220-15699-3-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a3a7cb7b
    • T
      perf trace/scripting: Add support for script args · 586bc5cc
      Tom Zanussi 提交于
      One oversight of the original scripting_ops patch was a lack of
      support for passing args to handler scripts.  This adds
      argc/argv to the start_script() scripting_op, and changes the
      rw-by-file script to take 'comm' arg rather than the 'perf'
      value currently hard-coded.  It also takes the opportunity to do
      some related minor cleanup.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      LKML-Reference: <1260867220-15699-2-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      586bc5cc
    • F
      perf tools: Make symbol_conf static · c249a4ce
      Frederic Weisbecker 提交于
      perf top, report and annotate all define their own symbol_conf,
      it should be static.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260843322-6602-1-git-send-regression-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c249a4ce
    • A
      perf diff: Introduce tool to show performance difference · 86a9eee0
      Arnaldo Carvalho de Melo 提交于
      I guess it is enough to show some examples:
      
      [root@doppio linux-2.6-tip]# rm -f perf.data*
      [root@doppio linux-2.6-tip]# ls -la perf.data*
      ls: cannot access perf.data*: No such file or directory
      [root@doppio linux-2.6-tip]# perf record -f find / > /dev/null
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.062 MB perf.data (~2699 samples) ]
      [root@doppio linux-2.6-tip]# ls -la perf.data*
      -rw------- 1 root root 74440 2009-12-14 20:03 perf.data
      [root@doppio linux-2.6-tip]# perf record -f find / > /dev/null
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.062 MB perf.data (~2692 samples) ]
      [root@doppio linux-2.6-tip]# ls -la perf.data*
      -rw------- 1 root root 74280 2009-12-14 20:03 perf.data
      -rw------- 1 root root 74440 2009-12-14 20:03 perf.data.old
      [root@doppio linux-2.6-tip]# perf diff | head -5
         1        -34994580     /lib64/libc-2.10.1.so   _IO_vfprintf_internal
         2        -15307806         [kernel.kallsyms]   __kmalloc
         3    +1   +3665941     /lib64/libc-2.10.1.so   __GI_memmove
         4    +4  +23508995     /lib64/libc-2.10.1.so   _int_malloc
         5    +7  +38538813         [kernel.kallsyms]   __d_lookup
      [root@doppio linux-2.6-tip]# perf diff -p | head -5
         1        +1.00%     /lib64/libc-2.10.1.so   _IO_vfprintf_internal
         2                       [kernel.kallsyms]   __kmalloc
         3    +1             /lib64/libc-2.10.1.so   __GI_memmove
         4    +4             /lib64/libc-2.10.1.so   _int_malloc
         5    +7  -1.00%         [kernel.kallsyms]   __d_lookup
      [root@doppio linux-2.6-tip]# perf diff -v | head -5
         1        361449551 326454971 -34994580     /lib64/libc-2.10.1.so   _IO_vfprintf_internal
         2        151009241 135701435 -15307806         [kernel.kallsyms]   __kmalloc
         3    +1  101805328 105471269  +3665941     /lib64/libc-2.10.1.so   __GI_memmove
         4    +4   78041440 101550435 +23508995     /lib64/libc-2.10.1.so   _int_malloc
         5    +7   59536172  98074985 +38538813         [kernel.kallsyms]   __d_lookup
      [root@doppio linux-2.6-tip]# perf diff -vp | head -5
         1        9.00% 8.00% +1.00%     /lib64/libc-2.10.1.so   _IO_vfprintf_internal
         2        3.00% 3.00%                [kernel.kallsyms]   __kmalloc
         3    +1  2.00% 2.00%            /lib64/libc-2.10.1.so   __GI_memmove
         4    +4  2.00% 2.00%            /lib64/libc-2.10.1.so   _int_malloc
         5    +7  1.00% 2.00% -1.00%         [kernel.kallsyms]   __d_lookup
      [root@doppio linux-2.6-tip]#
      
      This should be enough for diffs where the system is non
      volatile, i.e. when one doesn't updates binaries.
      
      For volatile environments, stay tuned for the next perf tool
      feature: a buildid cache populated by 'perf record', managed by
      'perf buildid-cache' a-la ccache, and used by all the report
      tools.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      LKML-Reference: <1260828571-3613-3-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      86a9eee0
    • A
      perf record: Rename perf.data to perf.data.old if --force/-f is used · b38d3464
      Arnaldo Carvalho de Melo 提交于
      Suggested-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260828571-3613-2-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b38d3464
    • A
      perf util: Remove setup_sorting dups · c8829c7a
      Arnaldo Carvalho de Melo 提交于
      And it is also needed by 'perf diff'.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260828571-3613-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c8829c7a
    • A
      perf session: Event statistics also are per session · f823e441
      Arnaldo Carvalho de Melo 提交于
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260810361-22828-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f823e441
    • A
      perf session: Adopt the sample_type variable · c019879b
      Arnaldo Carvalho de Melo 提交于
      All tools had copies, and perf diff would have to specify a
      sample_type_check method just for copying it.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260807780-19377-2-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c019879b
    • A
      perf session: Adopt resolve_callchain · a328626b
      Arnaldo Carvalho de Melo 提交于
      This is really a generic library routine, so declutter
      builtin-report.c a bit by moving it to the library.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260807780-19377-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a328626b
  3. 14 12月, 2009 4 次提交