1. 08 4月, 2010 1 次提交
  2. 04 4月, 2010 2 次提交
    • 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
  3. 03 4月, 2010 5 次提交
    • 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 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 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
  4. 26 3月, 2010 4 次提交
    • A
      perf report: Pass the DSO to 'perf annotate' · d5679ae4
      Arnaldo Carvalho de Melo 提交于
      So that we ensure that the symbol asked for annotation really is
      in the DSO we are interested in.
      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: <1269459619-982-6-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d5679ae4
    • A
      perf callchains: Store the map together with the symbol · b3c9ac08
      Arnaldo Carvalho de Melo 提交于
      We need this to know where a symbol in a callchain came from,
      for various reasons, among them precise annotation from a
      TUI/GUI tool.
      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: <1269459619-982-5-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b3c9ac08
    • A
      perf tools: Introduce struct map_symbol · 59fd5306
      Arnaldo Carvalho de Melo 提交于
      That will be in both struct hist_entry and struct
      callchain_list, so that the TUI can store a pointer to the pair
      (map, symbol) in the trees where hist_entries and
      callchain_lists are present, to allow precise annotation instead
      of looking for the first symbol with the selected name.
      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: <1269459619-982-4-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      59fd5306
    • A
      perf report: Add a popup menu to ask what operation is to be performed · 53c54019
      Arnaldo Carvalho de Melo 提交于
      Right now it presents a menu with these options:
      
       +------------------------------+
       | Annotate CURRENT_SYMBOL_NAME |
       | Exit                         |
       +------------------------------+
      
      If the highlighted (current) symbol is not annotatable only the
      "Exit" option will appear.
      
      Also add a confirmation dialog when ESC is pressed on the top
      level to avoid exiting the application by pressing one too many
      ESC key.
      
      To get to the menu just press the -> (Right navigation key), to
      exit just press ESC.
      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: <1269459619-982-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      53c54019
  5. 23 3月, 2010 2 次提交
    • 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 newt: Properly restore the screen when error exiting · f3a1f0ea
      Arnaldo Carvalho de Melo 提交于
      Show an OK message box with the last message sent via pr_err,
      etc.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      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-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f3a1f0ea
  6. 16 3月, 2010 1 次提交
    • A
      perf annotate: Properly notify the user that vmlinux is missing · d06d92b7
      Arnaldo Carvalho de Melo 提交于
      Before this patch we would not find a vmlinux, then try to pass
      objdump "[kernel.kallsyms]" as the filename, it would get
      confused and produce no output:
      
       [root@doppio ~]# perf annotate n_tty_write
      
       ------------------------------------------------
        Percent |      Source code & Disassembly of [kernel.kallsyms]
       ------------------------------------------------
      
      Now we check that and emit meaningful warning:
      
       [root@doppio ~]# perf annotate n_tty_write
       Can't annotate n_tty_write: No vmlinux file was found in the
       path: [0] vmlinux
       [1] /boot/vmlinux
       [2] /boot/vmlinux-2.6.34-rc1-tip+
       [3] /lib/modules/2.6.34-rc1-tip+/build/vmlinux
       [4] /usr/lib/debug/lib/modules/2.6.34-rc1-tip+/vmlinux
       [root@doppio ~]#
      
      This bug was introduced when we added automatic search for
      vmlinux, before that time the user had to specify a vmlinux
      file.
      
      v2: Print the warning just for the first symbol found when no
          symbol name is specified, otherwise it will spam the screen
          repeating the warning for each symbol.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      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>
      Cc: <stable@kernel.org>
      LKML-Reference: <1268669073-6856-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d06d92b7
  7. 13 3月, 2010 3 次提交
  8. 12 3月, 2010 1 次提交
    • A
      perf report: Implement initial UI using newt · f9224c5c
      Arnaldo Carvalho de Melo 提交于
      Newt has widespread availability and provides a rather simple
      API as can be seen by the size of this patch.
      
      The work needed to support it will benefit other frontends too.
      
      In this initial patch it just checks if the output is a tty, if
      not it falls back to the previous behaviour, also if
      newt-devel/libnewt-dev is not installed the previous behaviour
      is maintaned.
      
      Pressing enter on a symbol will annotate it, ESC in the
      annotation window will return to the report symbol list.
      
      More work will be done to remove the special casing in
      color_fprintf, stop using fmemopen/FILE in the printing of
      hist_entries, etc.
      
      Also the annotation doesn't need to be done via spawning "perf
      annotate" and then browsing its output, we can do better by
      calling directly the builtin-annotate.c functions, that would
      then be moved to tools/perf/util/annotate.c and shared with perf
      top, etc
      
      But lets go by baby steps, this patch already improves perf
      usability by allowing to quickly do annotations on symbols from
      the report screen and provides a first experimentation with
      libnewt/TUI integration of tools.
      
      Tested on RHEL5 and Fedora12 X86_64 and on Debian PARISC64 to
      browse a perf.data file collected on a Fedora12 x86_64 box.
      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: <1268349164-5822-5-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f9224c5c