1. 07 8月, 2010 1 次提交
  2. 06 8月, 2010 3 次提交
  3. 30 7月, 2010 1 次提交
  4. 27 7月, 2010 4 次提交
    • A
      perf ui: New hists tree widget · 0f0cbf7a
      Arnaldo Carvalho de Melo 提交于
      The stock newt checkbox tree widget we were using was not really
      suitable for hist entry + callchain browsing.
      
      The problems with it were manifold:
      
      - We needed to traverse the whole hist_entry rb_tree to add each entry +
        callchains beforehand.
      
      - No control over the colors used for each row
      
      So a new tree widget, based mostly on slang, was written.
      
      It extends the ui_browser class already used for annotate to allow the
      user to fold/unfold branches in the callchains tree, using extra fields
      in the symbol_map class that is embedded in hist_entry and
      callchain_node instances to store the folding state and when changing
      this state calculates the number of rows that are produced when showing
      a particular hist_entry instance.
      
      This greatly speeds up browsing as we don't have to upfront touch all
      the entries and only calculate callchain related operations when some
      callchain branch is actually unfolded.
      
      The memory footprint is also reduced as the data structure is not
      duplicated, just some extra fields for controling callchain state and to
      simplify the process of seeking thru entries (nr_rows, row_offset) were
      added.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0f0cbf7a
    • A
      perf ui: Show the scroll bar over the left window frame · 8d8c369f
      Arnaldo Carvalho de Melo 提交于
      So that we gain two columns and look more like classical (at least in
      TUIs) scroll bars bars.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8d8c369f
    • A
      perf ui: Consider the refreshed dimensions in ui_browser__show · 63160f73
      Arnaldo Carvalho de Melo 提交于
      When we call ui_browser__show we may have called
      ui_browser__refresh_dimensions to check if the maximum lenght for the
      contained entries changed, such as when zooming in and out DSOs or
      threads in the hist browser.
      
      For that to happen we must delete the old form, that will take care of
      deleting the vertical scrollbar, etc, and then recreate them, with the
      new dimensions.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      63160f73
    • A
      perf ui: Restore SPACE as an alias to PGDN in annotate · b61b55ed
      Arnaldo Carvalho de Melo 提交于
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b61b55ed
  5. 23 7月, 2010 1 次提交
  6. 18 7月, 2010 2 次提交
  7. 30 6月, 2010 1 次提交
  8. 22 6月, 2010 4 次提交
  9. 10 6月, 2010 1 次提交
  10. 27 5月, 2010 1 次提交
    • A
      perf tui: Reset use_browser if stdout is not a tty · 62e3436b
      Arnaldo Carvalho de Melo 提交于
      The newt initialization routines weren't being called because the output
      was a file (perf annotate > /tmp/bla) but use_browser was still 1,
      because ~/.perfconfig had it as 'on', so, later on newt routines
      segfaulted.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      62e3436b
  11. 24 5月, 2010 1 次提交
    • A
      perf report: Support multiple events on the TUI · d67f088e
      Arnaldo Carvalho de Melo 提交于
      The hists__tty_browse_tree function was created with the loop to print
      all events, and its equivalent, hists__tui_browse_tree, was created in a
      similar fashion, where it is possible to switch among the multiple
      events, if present, using TAB to go the next event, and shift+TAB
      (UNTAB) to go to the previous.
      
      The report TUI now shows as the window title the name of the event and a
      leak was fixed wrt pstacks.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d67f088e
  12. 22 5月, 2010 2 次提交
    • A
      perf annotate: Add TUI interface · 46e3e055
      Arnaldo Carvalho de Melo 提交于
      When annotating multiple entries, for instance, when running simply as:
      
      $ perf annotate
      
      the right and left keys, as well as TAB can be used to cycle thru the
      multiple symbols being annotated.
      
      If one doesn't like TUI annotate, disable it by editing ~/.perfconfig
      and adding:
      
      [tui]
      
      	annotate = off
      
      Just like it is possible for report.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      46e3e055
    • A
      perf tui: Remove annotate from popup menu after failure · 6e78c9fd
      Arnaldo Carvalho de Melo 提交于
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6e78c9fd
  13. 21 5月, 2010 1 次提交
    • A
      perf tui: Allow disabling the TUI on a per command basis in ~/.perfconfig · 5d06e691
      Arnaldo Carvalho de Melo 提交于
      Using the same scheme as for git's/perf's pager setup, i.e. if one
      doesn't want to, on a newt enabled perf binary, to disable the TUI for
      'perf report', its just a matter of doing:
      
        [root@doppio linux-2.6-tip]# printf "[tui]\n\nreport = off\n" >
        /root/.perfconfig
        [root@doppio linux-2.6-tip]# cat /root/.perfconfig
        [tui]
      
        report = off
        [root@doppio linux-2.6-tip]#
      
      System wide settings are also possible, by editing /etc/perfconfig, etc,
      i.e. the git machinery for config files applies to perf as well, so when
      in doubt where to put your settings, consult the git documentation, if
      it fails, please let us know.
      Suggested-by: NIngo Molnar <mingo@elte.hu>
      Discussed-with: Stephane Eranian <eranian@google.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5d06e691
  14. 20 5月, 2010 1 次提交
  15. 18 5月, 2010 1 次提交
  16. 17 5月, 2010 3 次提交
    • A
      perf tui: Add workaround for slang < 2.1.4 · dc4ff193
      Arnaldo Carvalho de Melo 提交于
      Older versions of the slang library didn't used the 'const' specifier,
      causing problems with modern compilers of this kind:
      
      util/newt.c:252: error: passing argument 1 of ‘SLsmg_printf’ discards
      qualifiers from pointer target type
      
      Fix it by using some wrappers that when needed const the affected
      parameters back to plain (char *).
      Reported-by: NLin Ming <ming.m.lin@intel.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Lin Ming <ming.m.lin@intel.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20100517145421.GD29052@ghostprotocols.net>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      dc4ff193
    • A
      perf tui: Add help window to show key associations · a9a4ab74
      Arnaldo Carvalho de Melo 提交于
      Suggested-by: NIngo Molnar <mingo@elte.hu>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a9a4ab74
    • A
      perf tui: Make <- exit menus too · a308f3a8
      Arnaldo Carvalho de Melo 提交于
      In fact it is now added to the hot key list when newt_form__new is used,
      allowing us to remove the explicit assignment in all its users.
      
      The visible change is that <- will exit the menu that pops up when -> is
      pressed (and Enter when callchains are not being used).
      Suggested-by: NIngo Molnar <mingo@elte.hu>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a308f3a8
  17. 16 5月, 2010 4 次提交
  18. 15 5月, 2010 3 次提交
    • A
      perf newt: Make <- zoom out filters · 3e1bbdc3
      Arnaldo Carvalho de Melo 提交于
      After we use the filters to zoom into DSOs or threads, we can use <-
      (left arrow) to zoom out from the last filter applied.
      
      It is still possible to zoom out of order by using the popup menu.
      
      With this we now have the zoom out operation on the browsing fast path,
      by allowing fast navigation using just the four arrors and the enter key
      to expand collapse callchains.
      Suggested-by: NIngo Molnar <mingo@elte.hu>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3e1bbdc3
    • A
      perf report: Report number of events, not samples · c82ee828
      Arnaldo Carvalho de Melo 提交于
      Number of samples is meaningless after we switched to auto-freq, so
      report the number of events, i.e. not the sum of the different periods,
      but the number PERF_RECORD_SAMPLE emitted by the kernel.
      
      While doing this I noticed that naming "count" to the sum of all the
      event periods can be confusing, so rename it to .period, just like in
      struct sample.data, so that we become more consistent.
      
      This helps with the next step, that was to record in struct hist_entry
      the number of sample events for each instance, we need that because we
      use it to generate the number of events when applying filters to the
      tree of hist entries like it is being done in the TUI report browser.
      Suggested-by: NIngo Molnar <mingo@elte.hu>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c82ee828
    • A
      perf hist: Clarify events_stats fields usage · cee75ac7
      Arnaldo Carvalho de Melo 提交于
      The events_stats.total field is too generic, rename it to .total_period,
      and also add a comment explaining that it is the sum of all the .period
      fields in samples, that is needed because we use auto-freq to avoid
      sampling artifacts.
      
      Ditto for events_stats.lost, that is the sum of all lost_event.lost
      fields, i.e. the number of events the kernel dropped.
      
      Looking at the users, builtin-sched.c can make use of these fields and
      stop doing it again.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cee75ac7
  19. 12 5月, 2010 2 次提交
    • A
      perf report: Librarize the annotation code and use it in the newt browser · ef7b93a1
      Arnaldo Carvalho de Melo 提交于
      Now we don't anymore use popen to run 'perf annotate' for the selected
      symbol, instead we collect per address samplings when processing samples
      in 'perf report' if we're using the newt browser, then we use this data
      directly to do annotation.
      
      Done this way we can actually traverse the objdump_line objects
      directly, matching the addresses to the collected samples and colouring
      them appropriately using lower level slang routines.
      
      The new ui_browser class will be reused for the main, callchain aware,
      histogram browser, when it will be made generic and don't assume that
      the objects are always instances of the objdump_line class maintained
      using list_heads.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ef7b93a1
    • A
      perf ui: Add ui_helpline methods · 3798ed7b
      Arnaldo Carvalho de Melo 提交于
      Initially this was just to be able to have a printf like method to
      prepare the formatted string and then pass to newtPushHelpLine, but as
      we already have for ui_progress, etc, its a step in identifying a
      restricted, highlevel set of widgets we can then have implementations
      for multiple widget sets (GTK, etc).
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3798ed7b
  20. 11 5月, 2010 1 次提交
  21. 10 5月, 2010 1 次提交
    • A
      perf newt: Use newtAddComponent() · 7f826453
      Arnaldo Carvalho de Melo 提交于
      Instead of newtAddComponents(just-one-entry, NULL), that is not needed
      if, like in this browser, we're adding just one component at a time.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7f826453
  22. 08 4月, 2010 1 次提交