1. 26 3月, 2010 4 次提交
    • A
      perf annotate: Allow specifying DSOs where to look for symbol · ac73c5a9
      Arnaldo Carvalho de Melo 提交于
      Using the same parameter as in 'perf report', allowing to
      specify just one and disambiguate between DSOs that have the
      symbol of interest.
      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-3-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ac73c5a9
    • A
      perf symbols: Avoid unnecessary symbol loading when dso list is specified · 96415e4d
      Arnaldo Carvalho de Melo 提交于
      We were performing the full thread__find_addr_location
      operation, i.e. resolving to a map/dso _and_ loading its symbols
      when we can optimize it by first calling thread__find_addr_map
      to find just the map/dso, check if it is one that we are
      interested in (passed via --dsos/-d in 'perf annotate', 'perf
      report', etc) and if not avoid loading the symtab.
      
      Nice speedup when we know which DSO we're 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-2-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      96415e4d
    • 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
    • C
      x86, perf: Add raw events support for the P4 PMU · d814f301
      Cyrill Gorcunov 提交于
      The adding of raw event support lead to complete code
      refactoring. I hope is became more readable then it was.
      
      The list of changes:
      
      1)  The 64bit config field is enough to hold all information we need
          to track event details. To achieve it we used *own* enum for
          events selection in ESCR register and map this key into proper
          value at moment of event enabling.
      
          For the same reason we use 12LSB bits in CCCR register -- to track
          which exactly cache trace event was requested. And we cear this bits
          at real 'write' moment.
      
      2)  There is no per-cpu area reserved for P4 PMU anymore. We
          don't need it. All is held by config.
      
      3)  Now we may use any available counter, ie we try to grab any
          possible counter.
      
      v2:
        - Lin Ming reported the lack of ESCR selector in CCCR for cache events
      
      v3:
        - Don't loose cache event codes at config unpacking procedure, we may
          need it one day so no obscure hack behind our back, better to clear
          reserved bits explicitly when needed (thanks Ming for pointing out)
      
        - Lin Ming fixed misplaced opcodes in cache events
      Signed-off-by: NCyrill Gorcunov <gorcunov@openvz.org>
      Tested-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Cyrill Gorcunov <gorcunov@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <1269403766.3409.6.camel@minggr.sh.intel.com>
      [ v4: did a few whitespace fixlets ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d814f301
  2. 24 3月, 2010 1 次提交
  3. 23 3月, 2010 8 次提交
    • 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
    • A
      perf stat: Better report failure to collect system wide stats · 084ab9f8
      Arnaldo Carvalho de Melo 提交于
      Before:
      
      [acme@doppio linux-2.6-tip]$ perf stat -a sleep 1s
      
       Performance counter stats for 'sleep 1s':
      
        <not counted>  task-clock-msecs
        <not counted>  context-switches
        <not counted>  CPU-migrations
        <not counted>  page-faults
        <not counted>  cycles
        <not counted>  instructions
        <not counted>  branches
        <not counted>  branch-misses
        <not counted>  cache-references
        <not counted>  cache-misses
      
          1.016998463  seconds time elapsed
      
      [acme@doppio linux-2.6-tip]$
      
      Now:
      
      [acme@doppio linux-2.6-tip]$ perf stat -a sleep 1s
      No permission to collect system-wide stats.
      Consider tweaking /proc/sys/kernel/perf_event_paranoid.
      [acme@doppio linux-2.6-tip]$
      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-4-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      084ab9f8
    • M
      perf probe: Add NO_DWARF make option · ca721e45
      Masami Hiramatsu 提交于
      Add NO_DWARF make option for testing build without libdw.
      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-3-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ca721e45
    • 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
    • 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
    • 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
    • I
      Merge commit 'v2.6.34-rc2' into perf/core · d2f1e15b
      Ingo Molnar 提交于
      Merge reason: Pick up latest perf fixes from upstream.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d2f1e15b
  4. 20 3月, 2010 12 次提交
  5. 19 3月, 2010 15 次提交