1. 21 9月, 2009 15 次提交
    • I
      perf: Tidy up after the big rename · 57c0c15b
      Ingo Molnar 提交于
       - provide compatibility Kconfig entry for existing PERF_COUNTERS .config's
      
       - provide courtesy copy of old perf_counter.h, for user-space projects
      
       - small indentation fixups
      
       - fix up MAINTAINERS
      
       - fix small x86 printout fallout
      
       - fix up small PowerPC comment fallout (use 'counter' as in register)
      Reviewed-by: NArjan van de Ven <arjan@linux.intel.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      57c0c15b
    • I
      perf: Do the big rename: Performance Counters -> Performance Events · cdd6c482
      Ingo Molnar 提交于
      Bye-bye Performance Counters, welcome Performance Events!
      
      In the past few months the perfcounters subsystem has grown out its
      initial role of counting hardware events, and has become (and is
      becoming) a much broader generic event enumeration, reporting, logging,
      monitoring, analysis facility.
      
      Naming its core object 'perf_counter' and naming the subsystem
      'perfcounters' has become more and more of a misnomer. With pending
      code like hw-breakpoints support the 'counter' name is less and
      less appropriate.
      
      All in one, we've decided to rename the subsystem to 'performance
      events' and to propagate this rename through all fields, variables
      and API names. (in an ABI compatible fashion)
      
      The word 'event' is also a bit shorter than 'counter' - which makes
      it slightly more convenient to write/handle as well.
      
      Thanks goes to Stephane Eranian who first observed this misnomer and
      suggested a rename.
      
      User-space tooling and ABI compatibility is not affected - this patch
      should be function-invariant. (Also, defconfigs were not touched to
      keep the size down.)
      
      This patch has been generated via the following script:
      
        FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')
      
        sed -i \
          -e 's/PERF_EVENT_/PERF_RECORD_/g' \
          -e 's/PERF_COUNTER/PERF_EVENT/g' \
          -e 's/perf_counter/perf_event/g' \
          -e 's/nb_counters/nb_events/g' \
          -e 's/swcounter/swevent/g' \
          -e 's/tpcounter_event/tp_event/g' \
          $FILES
      
        for N in $(find . -name perf_counter.[ch]); do
          M=$(echo $N | sed 's/perf_counter/perf_event/g')
          mv $N $M
        done
      
        FILES=$(find . -name perf_event.*)
      
        sed -i \
          -e 's/COUNTER_MASK/REG_MASK/g' \
          -e 's/COUNTER/EVENT/g' \
          -e 's/\<event\>/event_id/g' \
          -e 's/counter/event/g' \
          -e 's/Counter/Event/g' \
          $FILES
      
      ... to keep it as correct as possible. This script can also be
      used by anyone who has pending perfcounters patches - it converts
      a Linux kernel tree over to the new naming. We tried to time this
      change to the point in time where the amount of pending patches
      is the smallest: the end of the merge window.
      
      Namespace clashes were fixed up in a preparatory patch - and some
      stylistic fallout will be fixed up in a subsequent patch.
      
      ( NOTE: 'counters' are still the proper terminology when we deal
        with hardware registers - and these sed scripts are a bit
        over-eager in renaming them. I've undone some of that, but
        in case there's something left where 'counter' would be
        better than 'event' we can undo that on an individual basis
        instead of touching an otherwise nicely automated patch. )
      Suggested-by: NStephane Eranian <eranian@google.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      Reviewed-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: <linux-arch@vger.kernel.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cdd6c482
    • I
      perf_counter: Rename 'event' to event_id/hw_event · dfc65094
      Ingo Molnar 提交于
      In preparation to the renames, to avoid a namespace clash.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dfc65094
    • P
      perf_counter, powerpc, sparc: Fix compilation after perf_counter_overflow() change · cd74c86b
      Paul Mackerras 提交于
      Commit 5622f295 ("x86, perf_counter, bts: Optimize BTS overflow
      handling") removed the regs field from struct perf_sample_data and
      added a regs parameter to perf_counter_overflow().  This breaks the
      build on powerpc (and Sparc) as reported by Sachin Sant:
      
        arch/powerpc/kernel/perf_counter.c: In function 'record_and_restart':
        arch/powerpc/kernel/perf_counter.c:1165: error: unknown field 'regs' specified in initializer
      
      This adjusts arch/powerpc/kernel/perf_counter.c to correspond with the
      new struct perf_sample_data and perf_counter_overflow().
      
      [ v2: also fix Sparc, Markus Metzger <markus.t.metzger@intel.com> ]
      Reported-by: NSachin Sant <sachinp@in.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Cc: Markus Metzger <markus.t.metzger@intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: benh@kernel.crashing.org
      Cc: linuxppc-dev@ozlabs.org
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <19127.8400.376239.586120@drongo.ozlabs.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cd74c86b
    • L
      loongson: fix cut-and-paste mis-merge · dcbb5593
      Linus Torvalds 提交于
      Ingo points out that I screwed up when merging the 'timers-for-linus'
      branch in commit a03fdb76.
      
      A bit too much copy-and-pasting caused the end result to have an
      extraneous 'return' in the middle of an expression.  That was obviously
      bogus.  Blush.
      
      Reported-by-with-patch: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dcbb5593
    • A
      x86: Print the hypervisor returned tsc_khz during boot · 6399c087
      Alok Kataria 提交于
      On an AMD-64 system the processor frequency that is printed during
      system boot, may be different than the tsc frequency that was
      returned by the hypervisor, due to the value returned from
      calibrate_cpu.
      
      For debugging timekeeping or other related issues it might be
      better to get the tsc_khz value returned by the hypervisor.
      
      The patch below now prints the tsc frequency that the VMware
      hypervisor returned.
      Signed-off-by: NAlok N Kataria <akataria@vmware.com>
      LKML-Reference: <1252095219.12518.13.camel@ank32.eng.vmware.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6399c087
    • J
      x86: Correct segment permission flags in 64-bit linker script · 8d0cc631
      Jan Beulich 提交于
      While these don't get actively used (afaict), it still doesn't hurt
      for them to properly reflect what how respective segments will get
      mapped/ accessed.
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      LKML-Reference: <4AA0E95F0200007800013707@vpn.id2.novell.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8d0cc631
    • J
      x86: cpuinit-annotate SMP boot trampolines properly · 5f685639
      Jan Beulich 提交于
      Add missing annotations, and make use of include/linux/init.h's
      macros.
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      LKML-Reference: <4AA0E8F60200007800013703@vpn.id2.novell.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5f685639
    • J
      x86: Increase timeout for EHCI debug port reset completion in early printk · 414128bd
      Jan Beulich 提交于
      On one of my systems, several thousand iterations are needed before
      CMD_RESET can be observed clear after setting it. Using a much
      higher value here obviously cannot hurt.
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Cc: Yinghai Lu <yhlu.kernel@gmail.com>
      LKML-Reference: <4AA0E85D02000078000136F9@vpn.id2.novell.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      414128bd
    • S
      x86: Fix uaccess_32.h typo · 4fe48782
      Sergey Senozhatsky 提交于
      Trivial: correct "that the we don't" typo.
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      LKML-Reference: <20090917125401.GU3717@localdomain.by>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4fe48782
    • F
      x86: Trivial whitespace cleanups · 878f4f53
      Felipe Contreras 提交于
      Signed-off-by: NFelipe Contreras <felipe.contreras@gmail.com>
      Cc: Vegard Nossum <vegardno@ifi.uio.no>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alok N Kataria <akataria@vmware.com>
      Cc: "Tan Wei Chong" <wei.chong.tan@intel.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Lin Ming <ming.m.lin@intel.com>
      Cc: Bob Moore <robert.moore@intel.com>
      LKML-Reference: <1253137123-18047-2-git-send-email-felipe.contreras@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      878f4f53
    • C
      x86, apic: Fix missed handling of discrete apics · 8312136f
      Cyrill Gorcunov 提交于
      In case of discrete (pretty old) apics we may have cpu_has_apic bit
      not set but have to check if smp_found_config (MP spec) is there
      and apic was not disabled.
      
      Also don't forget to print apic/io-apic for such case as well.
      Signed-off-by: NCyrill Gorcunov <gorcunov@openvz.org>
      Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      LKML-Reference: <20090915071230.GA10604@lenovo>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8312136f
    • H
      x86/i386: Remove duplicated #include · efc8f741
      Huang Weiyi 提交于
      Remove duplicated #include in:
      
        arch/x86/kernel/cpu/common.c
      Signed-off-by: NHuang Weiyi <weiyi.huang@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      efc8f741
    • J
      x86, mtrr: Convert loop to a while based construct, avoid naked semicolon · 9ff6d8e0
      Joe Perches 提交于
      Perhaps this is a more readable/standard form.
      Signed-off-by: NJoe Perches <joe@perches.com>
      LKML-Reference: <1252945687.3937.14.camel@Joe-Laptop.home>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9ff6d8e0
    • P
      perf_counter: x86: Fix PMU resource leak · a1792cda
      Peter Zijlstra 提交于
      Dave noticed that we leak the PMU resource reservations when we
      fail the hardware counter init.
      Reported-by: NDavid Miller <davem@davemloft.net>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NDavid Miller <davem@davemloft.net>
      LKML-Reference: <1252483487.7746.164.camel@twins>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a1792cda
  2. 20 9月, 2009 10 次提交
  3. 19 9月, 2009 11 次提交
  4. 18 9月, 2009 4 次提交