1. 26 May, 2009 23 commits
    • Arnaldo Carvalho de Melo's avatar
      perf report: Fix kernel symbol resolution · 59d81029
      Arnaldo Carvalho de Melo authored
      kallsyms have just the symbol start, so we need to read two lines
      to get the len.
      
      [ Impact: fix incorrect kernel symbol display in perf report ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      59d81029
    • Peter Zijlstra's avatar
      perf report: Fix ELF symbol parsing · f17e04af
      Peter Zijlstra authored
      [ Impact: fix DSO symbol output in perf report ]
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f17e04af
    • Mike Galbraith's avatar
      perf top: fix typo in -d option · db20c003
      Mike Galbraith authored
      Clean up copy/paste options parsing conversion error.
      
      [ Impact: reactivate -d option ]
      Signed-off-by: default avatarMike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      db20c003
    • Mike Galbraith's avatar
      perf top: Remove leftover NMI/IRQ bits · f91183fe
      Mike Galbraith authored
      79202b removed IRQ/NMI mode selection, so remove it from
      perf top as well.
      
      [ Impact: cleanup ]
      Signed-off-by: default avatarMike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f91183fe
    • Ingo Molnar's avatar
      perf report: Add help/manpage · 0bec253c
      Ingo Molnar authored
      Add a (minimal) manpage for perf report.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0bec253c
    • Ingo Molnar's avatar
      perf record: Convert to Git option parsing · 53cb8bc2
      Ingo Molnar authored
      Remove getopt usage and use Git's much more advanced and more compact
      command option library.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      53cb8bc2
    • Peter Zijlstra's avatar
      perf report: Fix segfault on unknown symbols · f3e08c53
      Peter Zijlstra authored
      Ingo reported:
      
      > Program received signal SIGSEGV, Segmentation fault.
      > 0x0000003e25080f80 in strlen () from /lib64/libc.so.6
      > Missing separate debuginfos, use: debuginfo-install elfutils.x86_64
      > glibc.x86_64 zlib.x86_64
      > (gdb) bt
      > #0  0x0000003e25080f80 in strlen () from /lib64/libc.so.6
      > #1  0x0000003e2506954e in fputs () from /lib64/libc.so.6
      > #2  0x00000000004059e8 in cmd_report (argc=<value optimized out>,
      >     argv=<value optimized out>) at builtin-report.c:521
      > #3  0x0000000000402dad in handle_internal_command (argc=1, argv=0x7fffe1218e30)
      >     at perf.c:226
      > #4  0x0000000000402f6d in main (argc=1, argv=0x7fffe1218e30) at perf.c:324
      > (gdb)
      
      Signed-off-by Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f3e08c53
    • Arnaldo Carvalho de Melo's avatar
      perf_counter: Use rb_tree for symhists and threads in report · ce7e4365
      Arnaldo Carvalho de Melo authored
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ce7e4365
    • Arnaldo Carvalho de Melo's avatar
      perf_counter: Add our private copy of list.h · 040e6034
      Arnaldo Carvalho de Melo authored
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      040e6034
    • Arnaldo Carvalho de Melo's avatar
      perf_counter: Use rb_trees in perf report · 35a50c8a
      Arnaldo Carvalho de Melo authored
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      35a50c8a
    • Arnaldo Carvalho de Melo's avatar
      perf_counter: Implement dso__load using libelf · 62eb9390
      Arnaldo Carvalho de Melo authored
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      62eb9390
    • Ingo Molnar's avatar
      perf_counter tools: remove the standalone perf-report utility · fd4242bb
      Ingo Molnar authored
      With a built-in 'perf report' command now available, remove the
      standalone implementation for good.
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      fd4242bb
    • Arnaldo Carvalho de Melo's avatar
      perf_counter: First part of 'perf report' conversion to C + elfutils · 8fa66bdc
      Arnaldo Carvalho de Melo authored
      Integrate perf-report into 'perf', as builtin-report.c.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8fa66bdc
    • Ingo Molnar's avatar
      perf top: Convert to Git option parsing · b456bae0
      Ingo Molnar authored
      Remove getopt usage and use Git's much more advanced and more compact
      command option library.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b456bae0
    • Ingo Molnar's avatar
      perf stat: Convert to Git option parsing · 5242519b
      Ingo Molnar authored
      Remove getopt usage and use Git's much more advanced and more compact
      command option library.
      
      Extend the event parser library with the extensions that were in
      perf-stat before.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      5242519b
    • Ingo Molnar's avatar
      perf_counter tools: Librarize event string parsing · 8ad8db37
      Ingo Molnar authored
      Extract the event string parser from builtin-record.c, and
      librarize it - to be reused in other commands.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8ad8db37
    • Ingo Molnar's avatar
      perf record: Convert to Git option parsing · 0e9b20b8
      Ingo Molnar authored
      Remove getopt usage and use Git's much more advanced and more compact
      command option library.
      
      Git's library (util/parse-options.[ch]) constructs help texts and
      error messages automatically, and has a number of other convenience
      features as well.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0e9b20b8
    • Ingo Molnar's avatar
      perf stat: Remove unused variable · 4e97ddf0
      Ingo Molnar authored
      [ Impact: cleanup ]
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4e97ddf0
    • Ingo Molnar's avatar
      perf record: Straighten out argv types · 69aa48ab
      Ingo Molnar authored
      [ Impact: cleanup ]
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      69aa48ab
    • Ingo Molnar's avatar
      perf_counter: Initialize ->oncpu properly · 329d876d
      Ingo Molnar authored
      This shouldnt matter normally (and i have not seen any
      misbehavior), because active counters always have a
      proper ->oncpu value - but nevertheless initialize the
      field properly to -1.
      
      [ Impact: cleanup ]
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      329d876d
    • Ingo Molnar's avatar
      perf_counter, x86: Make NMI lockups more robust · aaba9801
      Ingo Molnar authored
      We have a debug check that detects stuck NMIs and returns with
      the PMU disabled in the global ctrl MSR - but i managed to trigger
      a situation where this was not enough to deassert the NMI.
      
      So clear/reset the full PMU and keep the disable count balanced when
      exiting from here. This way the box produces a debug warning but
      stays up and is more debuggable.
      
      [ Impact: in case of PMU related bugs, recover more gracefully ]
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      aaba9801
    • Ingo Molnar's avatar
      perf_counter, x86: Fix APIC NMI programming · 79202ba9
      Ingo Molnar authored
      My Nehalem box locks up in certain situations (with an
      always-asserted NMI causing a lockup) if the PMU LVT
      entry is programmed between NMI and IRQ mode with a
      high frequency.
      
      Standardize exlusively on NMIs instead.
      
      [ Impact: fix lockup ]
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      79202ba9
    • Paul Mackerras's avatar
      perf_counter: powerpc: Implement interrupt throttling · 8a7b8cb9
      Paul Mackerras authored
      This implements interrupt throttling on powerpc.  Since we don't have
      individual count enable/disable or interrupt enable/disable controls
      per counter, this simply sets the hardware counter to 0, meaning that
      it will not interrupt again until it has counted 2^31 counts, which
      will take at least 2^30 cycles assuming a maximum of 2 counts per
      cycle.  Also, we set counter->hw.period_left to the maximum possible
      value (2^63 - 1), so we won't report overflows for this counter for
      the forseeable future.
      
      The unthrottle operation restores counter->hw.period_left and the
      hardware counter so that we will once again report a counter overflow
      after counter->hw.irq_period counts.
      
      [ Impact: new perfcounters robustness feature on PowerPC ]
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      LKML-Reference: <18971.35823.643362.446774@cargo.ozlabs.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8a7b8cb9
  2. 25 May, 2009 14 commits
    • Ingo Molnar's avatar
      perf_counter: fix warning & lockup · 0127c3ea
      Ingo Molnar authored
       - remove bogus warning
       - fix wakeup from NMI path lockup
       - also fix up whitespace noise in perf_counter.h
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090525153931.703093461@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0127c3ea
    • Ingo Molnar's avatar
      Revert "perf_counter, x86: speed up the scheduling fast-path" · 53b441a5
      Ingo Molnar authored
      This reverts commit b68f1d2e.
      
      It is causing problems (stuck/stuttering profiling) - when mixed
      NMI and non-NMI counters are used.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090525153931.703093461@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      53b441a5
    • Peter Zijlstra's avatar
      perf_counter: Generic per counter interrupt throttle · a78ac325
      Peter Zijlstra authored
      Introduce a generic per counter interrupt throttle.
      
      This uses the perf_counter_overflow() quick disable to throttle a specific
      counter when its going too fast when a pmu->unthrottle() method is provided
      which can undo the quick disable.
      
      Power needs to implement both the quick disable and the unthrottle method.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090525153931.703093461@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a78ac325
    • Peter Zijlstra's avatar
      perf_counter: x86: Remove interrupt throttle · 48e22d56
      Peter Zijlstra authored
      remove the x86 specific interrupt throttle
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090525153931.616671838@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      48e22d56
    • Peter Zijlstra's avatar
      perf_counter: x86: Expose INV and EDGE bits · ff99be57
      Peter Zijlstra authored
      Expose the INV and EDGE bits of the PMU to raw configs.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090525153931.494709027@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ff99be57
    • Peter Zijlstra's avatar
      perf_counter: Fix PERF_COUNTER_CONTEXT_SWITCHES for cpu counters · 10989fb2
      Peter Zijlstra authored
      Ingo noticed that cpu counters had 0 context switches, even though
      there was plenty scheduling on the cpu.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090525124600.419025548@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      10989fb2
    • Peter Zijlstra's avatar
      perf_counter: Propagate inheritance failures down the fork() path · 6ab423e0
      Peter Zijlstra authored
      Fail fork() when we fail inheritance for some reason (-ENOMEM most likely).
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090525124600.324656474@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      6ab423e0
    • Peter Zijlstra's avatar
      perf_counter: Make pctrl() affect inherited counters too · 771d7cde
      Peter Zijlstra authored
      Paul noted that the new ptcrl() didn't work on child counters.
      Reported-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090525124600.203151469@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      771d7cde
    • Peter Zijlstra's avatar
      perf_counter: Remove unused ABI bits · e527ea31
      Peter Zijlstra authored
      extra_config_len isn't used for anything, remove it.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090525124600.116035832@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e527ea31
    • Peter Zijlstra's avatar
      perf_counter: Fix perf-$cmd invokation · 266dfb0b
      Peter Zijlstra authored
      Fix:
      
        $ perf-top
        fatal: cannot handle -top internally
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090525124559.995591577@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      266dfb0b
    • Ingo Molnar's avatar
      perf stat: flip around ':k' and ':u' flags · d3f4b385
      Ingo Molnar authored
      This output:
      
       $ perf stat -e 0:1:k -e 0:1:u ./hello
        Performance counter stats for './hello':
                140131  instructions         (events)
               1906968  instructions         (events)
      
      Is quite confusing - as :k means "user instructions", :u means
      "kernel instructions".
      
      Flip them around - as the 'exclude' property is not intuitive in
      the flag naming.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d3f4b385
    • Ingo Molnar's avatar
      perf_counter: Move child perfcounter init to after scheduler init · e4cbb4e3
      Ingo Molnar authored
      Initialize a task's perfcounters (inherit from parent, etc.) after
      the child task's scheduler fields have been initialized already.
      
      [ Impact: cleanup ]
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e4cbb4e3
    • Mike Galbraith's avatar
      perf top: Reduce display overhead · d94b9430
      Mike Galbraith authored
      Iterate over the symbol table once per display interval, and
      copy/sort/tally/decay only those symbols which are active.
      
      Before:
      
       top - 10:14:53 up  4:08, 17 users,  load average: 1.17, 1.53, 1.49
       Tasks: 273 total,   5 running, 268 sleeping,   0 stopped,   0 zombie
       Cpu(s):  6.9%us, 38.2%sy,  0.0%ni, 19.9%id,  0.0%wa,  0.0%hi, 35.0%si,  0.0%st
      
         PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  P COMMAND
       28504 root      20   0  1044  260  164 S   58  0.0   0:04.19 2 netserver
       28499 root      20   0  1040  412  316 R   51  0.0   0:04.15 0 netperf
       28500 root      20   0  1040  408  316 R   50  0.0   0:04.14 1 netperf
       28503 root      20   0  1044  260  164 S   50  0.0   0:04.01 1 netserver
       28501 root      20   0  1044  260  164 S   49  0.0   0:03.99 0 netserver
       28502 root      20   0  1040  412  316 S   43  0.0   0:03.96 2 netperf
       28468 root      20   0 1892m 325m  972 S   16 10.8   0:10.50 3 perf
       28467 root      20   0 1892m 325m  972 R    2 10.8   0:00.72 3 perf
      
      After:
      
       top - 10:16:30 up  4:10, 17 users,  load average: 2.27, 1.88, 1.62
       Tasks: 273 total,   6 running, 267 sleeping,   0 stopped,   0 zombie
       Cpu(s):  2.5%us, 39.7%sy,  0.0%ni, 24.6%id,  0.0%wa,  0.0%hi, 33.3%si,  0.0%st
      
         PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  P COMMAND
       28590 root      20   0  1040  412  316 S   54  0.0   0:07.85 2 netperf
       28589 root      20   0  1044  260  164 R   54  0.0   0:07.84 0 netserver
       28588 root      20   0  1040  412  316 R   50  0.0   0:07.89 1 netperf
       28591 root      20   0  1044  256  164 S   50  0.0   0:07.82 1 netserver
       28587 root      20   0  1040  408  316 R   47  0.0   0:07.61 0 netperf
       28592 root      20   0  1044  260  164 R   47  0.0   0:07.85 2 netserver
       28378 root      20   0  8732 1300  860 R    2  0.0   0:01.81 3 top
       28577 root      20   0 1892m 165m  972 R    2  5.5   0:00.48 3 perf
       28578 root      20   0 1892m 165m  972 S    2  5.5   0:00.04 3 perf
      
      [ Impact: optimization ]
      Signed-off-by: default avatarMike Galbraith <efault@gmx.de>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d94b9430
    • Ingo Molnar's avatar
      perf_counter tools: increase limits, fix · 85a9f920
      Ingo Molnar authored
      NR_CPUS and NR_COUNTERS goes up quadratic ... 1024x4096 was far
      too ambitious upper limit - go for 256x256 which is still plenty.
      
      [ Impact: reduce perf tool memory consumption ]
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      85a9f920
  3. 24 May, 2009 3 commits
    • Ingo Molnar's avatar
      perf_counter: Increase mmap limit · a3862d3f
      Ingo Molnar authored
      In a default 'perf top' run the tool will create a counter for
      each online CPU. With enough CPUs this will eventually exhaust
      the default limit.
      
      So scale it up with the number of online CPUs.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a3862d3f
    • Mike Galbraith's avatar
      perf top: fix segfault · c2990a2a
      Mike Galbraith authored
      c6eb13 increased stack usage such that perf-top now croaks on startup.
      
      Take event_array and mmap_array off the stack to prevent segfault on boxen
      with smallish ulimit -s setting.
      Signed-off-by: default avatarMike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c2990a2a
    • Peter Zijlstra's avatar
      perf_counter: Remove perf_counter_context::nr_enabled · 475c5579
      Peter Zijlstra authored
      now that pctrl() no longer disables other people's counters,
      remove the PMU cache code that deals with that.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090523163013.032998331@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      475c5579