1. 15 4月, 2010 2 次提交
    • 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
    • F
      perf tools: Fix accidentally preprocessed snprintf callback · fcd14984
      Frederic Weisbecker 提交于
      struct sort_entry has a callback named snprintf that turns an
      entry into a string result.
      But there are glibc versions that implement snprintf through a
      macro. The following expression is then going to get the snprintf
      call preprocessed:
      
              ent->snprintf(...)
      
      to finally end up in a build error:
      
              util/hist.c: Dans la fonction «hist_entry__snprintf» :
              util/hist.c:539: erreur: «struct sort_entry» has no member named «__builtin___snprintf_chk»
      
      To fix this, prepend struct sort_entry callbacks with an "se_"
      prefix.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fcd14984
  2. 14 4月, 2010 1 次提交
    • I
      perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() · c0555642
      Ian Munsie 提交于
      Parsing an option from the command line with OPT_BOOLEAN on a
      bool data type would not work on a big-endian machine due to the
      manner in which the boolean was being cast into an int and
      incremented. For example, running 'perf probe --list' on a
      PowerPC machine would fail to properly set the list_events bool
      and would therefore print out the usage information and
      terminate.
      
      This patch makes OPT_BOOLEAN work as expected with a bool
      datatype. For cases where the original OPT_BOOLEAN was
      intentionally being used to increment an int each time it was
      passed in on the command line, this patch introduces OPT_INCR
      with the old behaviour of OPT_BOOLEAN (the verbose variable is
      currently the only such example of this).
      
      I have reviewed every use of OPT_BOOLEAN to verify that a true
      C99 bool was passed. Where integers were used, I verified that
      they were only being used for boolean logic and changed them to
      bools to ensure that they would not be mistakenly used as ints.
      The major exception was the verbose variable which now uses
      OPT_INCR instead of OPT_BOOLEAN.
      Signed-off-by: NIan Munsie <imunsie@au.ibm.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Cc: <stable@kernel.org> # NOTE: wont apply to .3[34].x cleanly, please backport
      Cc: Git development list <git@vger.kernel.org>
      Cc: Ian Munsie <imunsie@au1.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Eric B Munson <ebmunson@us.ibm.com>
      Cc: Valdis.Kletnieks@vt.edu
      Cc: WANG Cong <amwang@redhat.com>
      Cc: Thiago Farina <tfransosi@gmail.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1271147857-11604-1-git-send-email-imunsie@au.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c0555642
  3. 08 4月, 2010 4 次提交
    • A
      perf trace: Ignore "overwrite" field if present in /events/header_page · e9e94e3b
      Arnaldo Carvalho de Melo 提交于
      That is not used in perf where we have the LOST events.
      
      Without this patch we get:
      
      [root@doppio ~]# perf lock report | head -3
        Warning: Error: expected 'data' but read 'overwrite'
      
      So, to make the same perf command work with kernels with and without
      this field, introduce variants for the parsing routines to not warn the
      user in such case.
      
      Discussed-with: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e9e94e3b
    • A
      perf tools: Reorganize some structs to save space · eed05fe7
      Arnaldo Carvalho de Melo 提交于
      Using 'pahole --packable' I found some structs that could be reorganized
      to eliminate alignment holes, in some cases getting them to be cacheline
      multiples.
      
      [acme@doppio linux-2.6-tip]$ codiff perf.old ~/bin/perf
      builtin-annotate.c:
        struct perf_session    |   -8
        struct perf_header     |   -8
       2 structs changed
      
      builtin-diff.c:
        struct sample_data         |   -8
       1 struct changed
        diff__process_sample_event |   -8
       1 function changed, 8 bytes removed, diff: -8
      
      builtin-sched.c:
        struct sched_atom      |   -8
       1 struct changed
      
      builtin-timechart.c:
        struct per_pid         |   -8
       1 struct changed
        cmd_timechart          |  -16
       1 function changed, 16 bytes removed, diff: -16
      
      builtin-probe.c:
        struct perf_probe_point |   -8
        struct perf_probe_event |   -8
       2 structs changed
        opt_add_probe_event     |   -3
       1 function changed, 3 bytes removed, diff: -3
      
      util/probe-finder.c:
        struct probe_finder      |   -8
       1 struct changed
        find_kprobe_trace_events |  -16
       1 function changed, 16 bytes removed, diff: -16
      
      /home/acme/bin/perf:
       4 functions changed, 43 bytes removed, diff: -43
      [acme@doppio linux-2.6-tip]$
      
      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: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      eed05fe7
    • A
      perf TUI: Move "Yes" button to before "No" · c0ed55d2
      Arnaldo Carvalho de Melo 提交于
      Esc + Enter should be enough warning to avoid accidentaly exiting from
      the browser.
      
      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: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c0ed55d2
    • A
      perf TUI: Show filters on the title and add help line about how to zoom out · 6e7ab4c6
      Arnaldo Carvalho de Melo 提交于
      Suggested-by: NIngo Molnar <molnar@elte.hu>
      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: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6e7ab4c6
  4. 04 4月, 2010 3 次提交
    • H
      perf: Swap inclusion order of util.h and string.h in util/string.c · 8141d005
      Hitoshi Mitake 提交于
      Currently util/string.c includes headers in this order: string.h, util.h
      But this causes a build error because __USE_GNU definition
      is needed for strndup() definition:
      
      	% make -j
      	touch .perf.dev.null
      	    CC util/string.o
      	cc1: warnings being treated as errors
      	util/string.c: In function ‘argv_split’:
      	util/string.c:171: error: implicit declaration of function ‘strndup’
      	util/string.c:171: error: incompatible implicit declaration of built-in function ‘strndup’
      
      So this patch swaps the headers inclusion order.
      util.h defines _GNU_SOURCE, and /usr/include/features.h defines
      __USE_GNU as 1 if _GNU_SOURCE is defined.
      Signed-off-by: NHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1270368798-27232-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      8141d005
    • A
      perf TUI: Add a "Zoom into COMM(PID) thread" and reverse operations · a5e29aca
      Arnaldo Carvalho de Melo 提交于
      Now one can press the right arrow key and in addition to being able to
      filter by DSO, filter out by thread too, or a combination of both
      filters.
      
      With this one can start collecting events for the whole system, then
      focus on a subset of the collected data quickly.
      
      Cc: Avi Kivity <avi@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: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a5e29aca
    • A
      perf newt: Add a "Zoom into foo.so DSO" and reverse operations · 83753190
      Arnaldo Carvalho de Melo 提交于
      Clicking on -> will bring as one of the popup menu options a "Zoom into
      CURRENT DSO", i.e. CURRENT will be replaced by the name of the DSO in
      the current line.
      
      Choosing this option will filter out all samples that didn't took place
      in a symbol in this DSO.
      
      After that the option reverts to "Zoom out of CURRENT DSO", to allow
      going back to the more compreensive view, not filtered by DSO.
      
      Future similar operations will include zooming into a particular thread,
      COMM, CPU, "last minute", "last N usecs", etc.
      
      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: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      83753190
  5. 03 4月, 2010 18 次提交
    • A
      perf newt: Pass the input_name to perf_session__browse_hists · 533c46c3
      Arnaldo Carvalho de Melo 提交于
      So that it can use it in the 'perf annotate' command line, otherwise
      it'll use the default and not the specified -i filename passed to 'perf
      report'.
      
      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: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      533c46c3
    • A
      perf newt: Move the hist browser population bits to separare function · e65713ea
      Arnaldo Carvalho de Melo 提交于
      Next patches will use that when applying filtes to then repopulate the
      browser with the narrowed vision.
      
      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: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e65713ea
    • A
      perf newt: Remove useless column width calculation · fb6b8931
      Arnaldo Carvalho de Melo 提交于
      Not used in the TUI interface.
      
      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: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fb6b8931
    • A
      perf symbols: Fill in pgoff in mmap synthesized events · 4af8b35d
      Anton Blanchard 提交于
      When we synthesize mmap events we need to fill in the pgoff field.
      
      I wasn't able to test this completely since I couldn't find an
      executable region with a non 0 offset. We will see it when we start
      doing data profiling.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <20100403115331.GK5594@kryten>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4af8b35d
    • A
      perf tools: Move the prototypes in util/string.h to util.h · e206d556
      Arnaldo Carvalho de Melo 提交于
      So that we avoid conflict with libc's string.h header.
      Reviewed-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Suggested-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.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>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e206d556
    • T
      perf/scripts: Tuple was set from long in both branches in python_process_event() · b1dcc03c
      Tom Zanussi 提交于
      This is a fix to the signed/unsigned field handling in the
      Python scripting engine, based on a patch from Roel Kluin.
      
      Basically, Python wants to use a PyInt (which is internally a
      long) if it can i.e. if the value will fit into that type.  If
      not, it stores it into a PyLong, which isn't actually a long,
      but an arbitrary-precision integer variable.
      
      The code below is similar to to what Python does internally, and
      it seems to work as expected on the x86 and x86_64 sytems I
      tested it on.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Roel Kluin <roel.kluin@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: rostedt@goodmis.org
      LKML-Reference: <1270184305.6422.10.camel@tropicana>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b1dcc03c
    • A
      perf tools: sort_dimension__add shouldn't die · 2aefa4f7
      Arnaldo Carvalho de Melo 提交于
      Propagate error instead.
      
      LKML-Reference: <new-submission>
      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>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2aefa4f7
    • A
      perf session: Remove one more exit() call from library code · ad5b217b
      Arnaldo Carvalho de Melo 提交于
      Return NULL instead and make the caller propagate the error.
      
      LKML-Reference: <new-submission>
      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>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ad5b217b
    • A
      perf hist: Only allocate callchain_node if processing callchains · b9fb9304
      Arnaldo Carvalho de Melo 提交于
      The struct callchain_node size is 120 bytes, that are never used when
      there are no callchains or '-g none' is specified, so conditionally
      allocate it, reducing sizeof(struct hist_entry) from 210 bytes to only
      96, greatly speeding the non-callchain processing.
      
      LKML-Reference: <new-submission>
      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>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b9fb9304
    • A
      perf kmem: Resolve kernel symbols again · e727ca73
      Arnaldo Carvalho de Melo 提交于
      Due to the assumption in perf_session__new that the kernel maps would be
      created using the fake PERF_RECORD_MMAP event in a perf.data file 'perf
      kmem --stat caller', that doesn't have such event, ends up not being
      able to resolve the kernel addresses.
      
      Fix it by calling perf_session__create_kernel_maps() in __cmd_kmem().
      
      LKML-Reference: <new-submission>
      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>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e727ca73
    • A
      perf hist: Replace ->print() routines by ->snprintf() equivalents · a4e3b956
      Arnaldo Carvalho de Melo 提交于
      Then hist_entry__fprintf will just us the newly introduced
      hist_entry__snprintf, add the newline and fprintf it to the supplied
      FILE descriptor.
      
      This allows us to remove the use_browser checking in the color_printf
      routines, that now got color_snprintf variants too.
      
      The newt TUI browser (and other GUIs that may come in the future) don't
      have to worry about stdio specific stuff in the strings they get from
      the se->snprintf routines and instead use whatever means to do the
      equivalent.
      
      Also the newt TUI browser don't have to use the fmemopen() hack, instead
      it can use the se->snprintf routines directly. For now tho use the
      hist_entry__snprintf routine to reduce the patch size.
      
      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>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a4e3b956
    • A
      perf tools: Allow specifying O= to build files in a separate directory · c29ede61
      Arnaldo Carvalho de Melo 提交于
      Avoiding polluting the source tree with build files.
      Reported-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      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>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c29ede61
    • A
      perf report: Add progress bars · 5f4d3f88
      Arnaldo Carvalho de Melo 提交于
      For when we are processing the events and inserting the entries in the
      browser.
      
      Experimentation here: naming "ui_something" we may be treading into
      creating a TUI/GUI set of routines that can then be implemented in terms
      of multiple backends.
      
      Also the time it takes for adding things to the "browser" takes, visually
      (I guess I should do some profiling here ;-) ), more time than for
      processing the events...
      
      That means we probably need to create a custom hist_entry browser, so
      that we reuse the structures we have in place instead of duplicating
      them in newt.
      
      But progress was made and at least we can see something while long files
      are being loaded, that must be one of UI 101 bullet points :-)
      
      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>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5f4d3f88
    • A
      perf symbols: map_groups__find_symbol must return the map too · 7e5e1b14
      Arnaldo Carvalho de Melo 提交于
      Tools need to know from which map in the map_group a symbol was resolved
      to, so that, for isntance, we can annotate kernel modules symbols by
      getting its precise name, etc.
      
      Also add the _by_name variants for completeness.
      
      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>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7e5e1b14
    • A
      perf symbols: Move more map_groups methods to map.c · c6e718ff
      Arnaldo Carvalho de Melo 提交于
      While writing a standalone test app that uses the symbol system to
      find kernel space symbols I noticed these also need to be moved.
      
      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>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c6e718ff
    • 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
  6. 26 3月, 2010 9 次提交
  7. 23 3月, 2010 3 次提交
    • A
      perf report: Implement Newt callgraphs · 4ded2b25
      Arnaldo Carvalho de Melo 提交于
      Starts collapsed, allows annotating by pressing 'A' or 'a' on
      the symbol, be it the top level one or any of the symbols in the
      chains.
      
      It (ab)uses the only tree widget in newt, that is actually a
      checkbox tree that we use with just one option ('.'), end result
      is usable but we really need to create a custom widget tree so
      that we can use the data structures we have (hist_entry rb_tree
      + callchain rb_tree + lists), so that we reduce the memory
      footprint by not creating a mirror set of data structures in the
      newtCheckboxTree widget.
      
      Thanks to Frédéric Weisbacker for fixing the orphanage problem
      in 301fde27, without that we were tripping a newt bug (fix
      already sent to newt's maintainer).
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Avi Kivity <avi@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: <1269291169-29820-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4ded2b25
    • A
      perf tools: Exit browser before printing usage when unkown option passed · 478b0973
      Arnaldo Carvalho de Melo 提交于
      If not the screen will get garbled when using newt.
      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: <1269274229-20442-5-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      478b0973
    • M
      perf probe: Cleanup debuginfo related code · 4b4da7f7
      Masami Hiramatsu 提交于
      Cleanup debuginfo related code to eliminate fragile code which
      pointed by Ingo (Thanks!).
      1) Invert logic of NO_DWARF_SUPPORT to DWARF_SUPPORT.
      2) For removing assymetric/local variable ifdefs, introduce
        more helper functions.
      3) Change options order to reduce the number of ifdefs.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1269274229-20442-2-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4b4da7f7