linux/drivers
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
..
accessibility
acpi Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-09-16 07:49:54 -07:00
amba Merge branches 'arm', 'at91', 'bcmring', 'ep93xx', 'mach-types', 'misc' and 'w90x900' into devel 2009-09-12 12:01:34 +01:00
ata libata: Add pata_atp867x driver for Artop/Acard ATP867X controllers 2009-09-17 16:47:06 -04:00
atm
auxdisplay
base Driver-Core: extend devnode callbacks to provide permissions 2009-09-19 12:50:38 -07:00
block Driver-Core: extend devnode callbacks to provide permissions 2009-09-19 12:50:38 -07:00
bluetooth pcmcia: dtl1_cs: fix pcmcia_loop_config logic 2009-09-15 10:17:16 -07:00
cdrom
char perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
clocksource
connector
cpufreq Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq 2009-09-18 09:16:57 -07:00
cpuidle tracing, x86, cpuidle: Move the end point of a C state in the power tracer 2009-09-19 18:57:52 +02:00
crypto
dca
dio
dma at_hdmac: Rework suspend_late()/resume_early() 2009-09-14 20:27:00 +02:00
edac amd64_edac: check NB MCE bank enable on the current node properly 2009-09-16 13:05:46 +02:00
eisa
firewire driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
firmware driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
gpio gpio: Add WM831X GPIO driver 2009-09-17 09:47:01 +02:00
gpu Driver-Core: extend devnode callbacks to provide permissions 2009-09-19 12:50:38 -07:00
hid Driver-Core: extend devnode callbacks to provide permissions 2009-09-19 12:50:38 -07:00
hwmon Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 2009-09-18 09:22:36 -07:00
i2c [PATCH] i2c-imx: make bus available early 2009-09-19 23:36:56 +01:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6 2009-09-15 10:01:16 -07:00
idle
ieee1394 drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
ieee802154 netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
infiniband driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
input Driver-Core: extend devnode callbacks to provide permissions 2009-09-19 12:50:38 -07:00
isdn tty: gigaset: really fix chars_in_buffer 2009-09-19 13:13:09 -07:00
leds
lguest
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-09-15 09:51:09 -07:00
mca
md Driver-Core: extend devnode callbacks to provide permissions 2009-09-19 12:50:38 -07:00
media Driver-Core: extend devnode callbacks to provide permissions 2009-09-19 12:50:38 -07:00
memstick
message Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-09-14 17:53:36 -07:00
mfd mfd: Convert WM8350 to use request_threaded_irq() 2009-09-17 15:48:18 +02:00
misc Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2009-09-18 09:33:07 -07:00
mmc driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
mtd Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2009-09-18 09:19:26 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2009-09-20 15:55:39 -07:00
nubus
of
oprofile
parisc
parport
pci Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-09-16 07:49:54 -07:00
pcmcia Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pcmcia-2.6 2009-09-16 08:11:23 -07:00
platform hp-wmi: Switch driver to dev_pm_ops 2009-09-14 20:26:59 +02:00
pnp
power
pps
ps3 powerpc/ps3: Workaround for flash memory I/O error 2009-09-11 11:28:00 +10:00
rapidio
regulator regulator: Voltage count for AB3100 2009-09-17 15:48:24 +02:00
rtc Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2009-09-18 09:43:09 -07:00
s390 driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
sbus
scsi includecheck fix: drivers/scsi, ibmvscsi.c 2009-09-20 16:01:29 +05:30
serial uartlite: support shared interrupt lines 2009-09-19 13:13:38 -07:00
sh sh: Fix up simplified multi-evt handling under sparseirq. 2009-08-31 15:15:33 +09:00
sn
spi Merge branch 'master' into devel 2009-09-12 12:04:37 +01:00
ssb ssb/sdio: fix printk format warnings 2009-09-16 16:21:00 -04:00
staging MIPS: Octeon: False positive timeout 2009-09-17 20:07:41 +02:00
tc
telephony
thermal
uio Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2009-09-18 09:43:09 -07:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2009-09-20 15:55:39 -07:00
uwb Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb 2009-09-17 09:44:09 -07:00
video includecheck fix: drivers/video, vgacon.c 2009-09-20 16:01:58 +05:30
virtio
vlynq
w1
watchdog [WATCHDOG] sizeof cleanup 2009-09-18 08:39:37 +00:00
xen includecheck fix: drivers/xen, evtchn.c 2009-09-20 16:02:20 +05:30
zorro
Kconfig
Makefile