1. 08 7月, 2010 1 次提交
    • F
      perf: Sync callchains with period based hits · 108553e1
      Frederic Weisbecker 提交于
      Hists have their hits increased by the event period. And this
      period based counting is the foundation of all the stats in
      perf report.
      
      But callchains still use the raw number of hits, without taking
      the period into account. So when we compute the percentage,
      absolute based percentages are totally broken, and relative ones
      too in the first parent level. Because we pass the number of events
      muliplied by their period as the total number of hits to the
      callchain filtering, while callchains expect this number to be
      the number of raw hits.
      
      perf report -g graph was simply not working, showing no graph unless
      the min percent was zero. And even there the percentage of the
      branches was always 0. And may be fractal filtering was broken on
      the first branch level too.
      
      flat also was broken, but it was hidden because of other breakages.
      
      Anyway fix this by counting using periods on callchains.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      108553e1
  2. 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
  3. 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 report: Don't start the TUI if -D is used · 0e8dc259
      Arnaldo Carvalho de Melo 提交于
      One day we'll have support for the "dump raw trace in ASCII" in the TUI
      frontend, but till then, use the tty code.
      Reported-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      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>
      0e8dc259
  4. 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
  5. 18 5月, 2010 1 次提交
    • A
      perf options: Type check all the remaining OPT_ variants · edb7c60e
      Arnaldo Carvalho de Melo 提交于
      OPT_SET_INT was renamed to OPT_SET_UINT since the only use in these
      tools is to set something that has an enum type, that is builtin
      compatible with unsigned int.
      
      Several string constifications were done to make OPT_STRING require a
      const char * type.
      
      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>
      edb7c60e
  6. 15 5月, 2010 2 次提交
    • 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
  7. 14 5月, 2010 1 次提交
  8. 12 5月, 2010 1 次提交
    • 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
  9. 11 5月, 2010 3 次提交
    • A
      perf hist: Adopt filter by dso and by thread methods from the newt browser · b09e0190
      Arnaldo Carvalho de Melo 提交于
      Those are really not specific to the newt code, can be used by other UI
      frontends.
      
      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>
      b09e0190
    • A
      perf hist: Calculate max_sym name len and nr_entries · fefb0b94
      Arnaldo Carvalho de Melo 提交于
      Better done when we are adding entries, be it initially of when we're
      re-sorting the histograms.
      
      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>
      fefb0b94
    • A
      perf hist: Introduce hists class and move lots of methods to it · 1c02c4d2
      Arnaldo Carvalho de Melo 提交于
      In cbbc79a5 we introduced support for multiple events by introducing a
      new "event_stat_id" struct and then made several perf_session methods
      receive a point to it instead of a pointer to perf_session, and kept the
      event_stats and hists rb_tree in perf_session.
      
      While working on the new newt based browser, I realised that it would be
      better to introduce a new class, "hists" (short for "histograms"),
      renaming the "event_stat_id" struct and the perf_session methods that
      were really "hists" methods, as they manipulate only struct hists
      members, not touching anything in the other perf_session members.
      
      Other optimizations, such as calculating the maximum lenght of a symbol
      name present in an hists instance will be possible as we add them,
      avoiding a re-traversal just for finding that information.
      
      The rationale for the name "hists" to replace "event_stat_id" is that we
      may have multiple sets of hists for the same event_stat id, as, for
      instance, the 'perf diff' tool has, so event stat id is not what
      characterizes what this struct and the functions that manipulate it do.
      
      Cc: Eric B Munson <ebmunson@us.ibm.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: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1c02c4d2
  10. 10 5月, 2010 4 次提交
  11. 09 5月, 2010 1 次提交
    • P
      perf report: Document '--call-graph' better for usage · e157eb83
      Pekka Enberg 提交于
      This patch improves 'perf report -h' output for the
      '--call-graph' command line option by enumerating the
      different output types.
      Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.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>
      LKML-Reference: <1273332783-4268-1-git-send-email-penberg@cs.helsinki.fi>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e157eb83
  12. 03 5月, 2010 1 次提交
    • T
      perf: add perf-inject builtin · 454c407e
      Tom Zanussi 提交于
      Currently, perf 'live mode' writes build-ids at the end of the
      session, which isn't actually useful for processing live mode events.
      
      What would be better would be to have the build-ids sent before any of
      the samples that reference them, which can be done by processing the
      event stream and retrieving the build-ids on the first hit.  Doing
      that in perf-record itself, however, is off-limits.
      
      This patch introduces perf-inject, which does the same job while
      leaving perf-record untouched.  Normal mode perf still records the
      build-ids at the end of the session as it should, but for live mode,
      perf-inject can be injected in between the record and report steps
      e.g.:
      
      perf record -o - ./hackbench 10 | perf inject -v -b | perf report -v -i -
      
      perf-inject reads a perf-record event stream and repipes it to stdout.
      At any point the processing code can inject other events into the
      event stream - in this case build-ids (-b option) are read and
      injected as needed into the event stream.
      
      Build-ids are just the first user of perf-inject - potentially
      anything that needs userspace processing to augment the trace stream
      with additional information could make use of this facility.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1272696080-16435-3-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      454c407e
  13. 28 4月, 2010 2 次提交
    • A
      perf machines: Make the machines class adopt the dsos__fprintf methods · cbf69680
      Arnaldo Carvalho de Melo 提交于
      Now those methods don't operate on a global list of dsos, but on lists
      of machines, so make this clear by renaming the functions.
      
      Cc: Avi Kivity <avi@redhat.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: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cbf69680
    • A
      perf tools: Rename "kernel_info" to "machine" · 23346f21
      Arnaldo Carvalho de Melo 提交于
      struct kernel_info and kerninfo__ are too vague, what they really
      describe are machines, virtual ones or hosts.
      
      There are more changes to introduce helpers to shorten function calls
      and to make more clear what is really being done, but I left that for
      subsequent patches.
      
      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>
      Cc: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      23346f21
  14. 19 4月, 2010 1 次提交
  15. 14 4月, 2010 6 次提交
    • T
      perf: Convert perf header build_ids into build_id events · c7929e47
      Tom Zanussi 提交于
      Bypasses the build_id perf header code and replaces it with a
      synthesized event and processing function that accomplishes the
      same thing, used when reading/writing perf data to/from a pipe.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      Cc: k-keiichi@bx.jp.nec.com
      Cc: acme@ghostprotocols.net
      LKML-Reference: <1270184365-8281-9-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c7929e47
    • T
      perf: Convert perf tracing data into a tracing_data event · 9215545e
      Tom Zanussi 提交于
      Bypasses the tracing_data perf header code and replaces it with
      a synthesized event and processing function that accomplishes
      the same thing, used when reading/writing perf data to/from a
      pipe.
      
      The tracing data is pretty large, and this patch doesn't attempt
      to break it down into component events.  The tracing_data event
      itself doesn't actually contain the tracing data, rather it
      arranges for the event processing code to skip over it after
      it's read, using the skip return value added to the event
      processing loop in a previous patch.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      Cc: k-keiichi@bx.jp.nec.com
      Cc: acme@ghostprotocols.net
      LKML-Reference: <1270184365-8281-8-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9215545e
    • T
      perf: Convert perf event types into event type events · cd19a035
      Tom Zanussi 提交于
      Bypasses the event type perf header code and replaces it with a
      synthesized event and processing function that accomplishes the
      same thing, used when reading/writing perf data to/from a pipe.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      Cc: k-keiichi@bx.jp.nec.com
      Cc: acme@ghostprotocols.net
      LKML-Reference: <1270184365-8281-7-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cd19a035
    • T
      perf: Convert perf header attrs into attr events · 2c46dbb5
      Tom Zanussi 提交于
      Bypasses the attr perf header code and replaces it with a
      synthesized event and processing function that accomplishes the
      same thing, used when reading/writing perf data to/from a pipe.
      
      Making the attrs into events allows them to be streamed over a
      pipe along with the rest of the header data (in later patches).
      It also paves the way to allowing events to be added and removed
      from perf sessions dynamically.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      Cc: k-keiichi@bx.jp.nec.com
      Cc: acme@ghostprotocols.net
      LKML-Reference: <1270184365-8281-6-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2c46dbb5
    • T
      perf report: Introduce special handling for pipe input · 46656ac7
      Tom Zanussi 提交于
      Adds special treatment for stdin - if the user specifies '-i -'
      to perf report, the intent is that the event stream be written
      to stdin rather than from a disk file.
      
      The actual handling of the '-' filename is done by the session;
      this just adds a signal handler to stop reporting, and turns off
      interference by the pager.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      Cc: k-keiichi@bx.jp.nec.com
      Cc: acme@ghostprotocols.net
      LKML-Reference: <1270184365-8281-4-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      46656ac7
    • 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
  16. 03 4月, 2010 6 次提交
  17. 26 3月, 2010 1 次提交
  18. 23 3月, 2010 1 次提交
    • F
      perf: Fix orphan callchain branches · 301fde27
      Frederic Weisbecker 提交于
      Callchains have markers inside their capture to tell we
      enter a context (kernel, user, ...).
      
      Those are not displayed in the callchains but they are
      incidentally an active part of the radix tree where
      callchains are stored, just like any other address.
      
      If we have the two following callchains:
      
      addr1 -> addr2 -> user context -> addr3
      addr1 -> addr2 -> user context -> addr4
      addr1 -> addr2 -> addr 5
      
      This is pretty common if addr1 and addr2 are part of an
      interrupt path, addr3 and addr4 are user addresses and
      addr5 is a kernel non interrupt path.
      
      This will be stored as follows in the tree:
      
                         addr1
                         addr2
                         /   \
                        /     addr5
                  user context
                     /    \
                   addr3  addr4
      
      But we ignore the context markers in the report, hence
      the addr3 and addr4 will appear as orphan branches:
      
          |--28.30%-- hrtimer_interrupt
          |          smp_apic_timer_interrupt
          |          apic_timer_interrupt
          |          |           <------------- here, no parent!
          |          |          |
          |          |          |--11.11%-- 0x7fae7bccb875
          |          |          |
          |          |          |--11.11%-- 0xffffffffff60013b
          |          |          |
          |          |          |--11.11%-- __pthread_mutex_lock_internal
          |          |          |
          |          |          |--11.11%-- __errno_location
      
      Fix this by removing the context markers when we process the
      callchains to the tree.
      Reported-by: NArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1269274173-20328-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      301fde27
  19. 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
  20. 10 3月, 2010 3 次提交