linux/arch/mips
Ingo Molnar cdd6c482c9 perf: Do the big rename: Performance Counters -> Performance Events
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: Stephane Eranian <eranian@google.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Paul Mackerras <paulus@samba.org>
Reviewed-by: Arjan 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: Ingo Molnar <mingo@elte.hu>
2009-09-21 14:28:04 +02:00
..
alchemy MIPS: Alchemy: override loops_per_jiffy detection 2009-09-17 20:07:51 +02:00
ar7 MIPS: AR7: Make board code register ar7_wdt as a platform device 2009-09-17 20:07:48 +02:00
basler/excite platform driver: fix incorrect use of 'platform_bus_type' with 'struct device_driver' 2009-03-24 16:38:25 -07:00
bcm47xx MIPS: WGT634U: Add reset button support 2008-10-15 12:46:51 +01:00
bcm63xx MIPS: BCM63xx: Add integrated ethernet mac support. 2009-09-17 20:07:53 +02:00
boot MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
cavium-octeon MIPS: Octeon: Move some platform device registration to its own file. 2009-09-17 20:07:52 +02:00
cobalt Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
configs MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
dec Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-18 09:15:24 -07:00
emma MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
fw MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
gt64120/wrppmc Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
include/asm perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
jazz MIPS: Jazz: Fix read buffer overflow 2009-08-03 17:52:47 +01:00
kernel perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
lasat timekeeping: Increase granularity of read_persistent_clock() 2009-08-15 10:55:46 +02:00
lib MIPS: Fix __ndelay build error and add 'ull' suffix for 32-bit kernel 2009-06-17 11:06:24 +01:00
loongson loongson: fix cut-and-paste mis-merge 2009-09-20 15:57:28 -07:00
math-emu MIPS: Switch FPU emulator trap to BREAK instruction. 2008-10-30 14:44:34 +00:00
mipssim MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
mm MIPS: BCM63xx: Add Broadcom 63xx CPU definitions. 2009-09-17 20:07:52 +02:00
mti-malta Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-18 09:15:24 -07:00
nxp MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
oprofile MIPS: Loongson: Add oprofile support 2009-09-17 20:07:47 +02:00
pci MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
pmc-sierra timekeeping: Increase granularity of read_persistent_clock() 2009-08-15 10:55:46 +02:00
power MIPS: Use PAGE_SIZE in assembly instead of _PAGE_SIZE. 2009-09-17 20:07:48 +02:00
rb532 MIPS: RB532: Check irq number when handling GPIO interrupts 2009-06-17 11:06:27 +01:00
sgi-ip22 MIPS: IP22, IP28: Build with -Werror 2009-09-17 20:07:44 +02:00
sgi-ip27 MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users. 2009-06-24 18:34:39 +01:00
sgi-ip32 MIPS: IP32: Remove unnecessary if not even harmful volatile keywords. 2009-05-22 13:52:06 +01:00
sibyte timekeeping: Increase granularity of read_persistent_clock() 2009-08-15 10:55:46 +02:00
sni timekeeping: Increase granularity of read_persistent_clock() 2009-08-15 10:55:46 +02:00
txx9 MIPS: TXx9: Fix error handling. 2009-09-17 20:07:43 +02:00
vr41xx Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
Kconfig MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
Kconfig.debug MIPS: Kconfig: Fix the arch-specific header path 2008-12-12 18:12:23 +00:00
Makefile MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00