All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] perf: Kernel updates
@ 2012-04-05 16:24 Robert Richter
  2012-04-05 16:24 ` [PATCH 1/4] perf: Trivial cleanup of duplicate code Robert Richter
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Robert Richter @ 2012-04-05 16:24 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Stephane Eranian, Arnaldo Carvalho de Melo, LKML,
	Robert Richter

Enclosed some changes made while working with the code. Mostly trivial
but worth to add.

-Robert


Robert Richter (4):
  perf: Trivial cleanup of duplicate code
  perf, x86: Fix cmpxchg() usage in amd_put_event_constraints()
  perf: use static variant of perf_event_overflow in core.c
  perf: Remove PERF_COUNTERS config option

 arch/arm/configs/bcmring_defconfig        |    2 +-
 arch/powerpc/configs/chroma_defconfig     |    2 +-
 arch/powerpc/configs/gamecube_defconfig   |    2 +-
 arch/powerpc/configs/wii_defconfig        |    2 +-
 arch/sh/configs/sh7785lcr_32bit_defconfig |    2 +-
 arch/sparc/configs/sparc64_defconfig      |    2 +-
 arch/x86/kernel/cpu/perf_event.c          |    3 ---
 arch/x86/kernel/cpu/perf_event_amd.c      |    4 +---
 init/Kconfig                              |   14 +-------------
 kernel/events/core.c                      |    2 +-
 10 files changed, 9 insertions(+), 26 deletions(-)

-- 
1.7.8.4



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] perf: Trivial cleanup of duplicate code
  2012-04-05 16:24 [PATCH 0/4] perf: Kernel updates Robert Richter
@ 2012-04-05 16:24 ` Robert Richter
  2012-04-26 12:17   ` [tip:perf/core] " tip-bot for Robert Richter
  2012-04-05 16:24 ` [PATCH 2/4] perf, x86: Fix cmpxchg() usage in amd_put_event_constraints() Robert Richter
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Robert Richter @ 2012-04-05 16:24 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Stephane Eranian, Arnaldo Carvalho de Melo, LKML,
	Robert Richter

Removing duplicate code.

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
 arch/x86/kernel/cpu/perf_event.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 56ae3af..16726a9 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -485,9 +485,6 @@ static int __x86_pmu_event_init(struct perf_event *event)
 
 	/* mark unused */
 	event->hw.extra_reg.idx = EXTRA_REG_NONE;
-
-	/* mark not used */
-	event->hw.extra_reg.idx = EXTRA_REG_NONE;
 	event->hw.branch_reg.idx = EXTRA_REG_NONE;
 
 	return x86_pmu.hw_config(event);
-- 
1.7.8.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] perf, x86: Fix cmpxchg() usage in amd_put_event_constraints()
  2012-04-05 16:24 [PATCH 0/4] perf: Kernel updates Robert Richter
  2012-04-05 16:24 ` [PATCH 1/4] perf: Trivial cleanup of duplicate code Robert Richter
@ 2012-04-05 16:24 ` Robert Richter
  2012-04-26 12:18   ` [tip:perf/core] perf/x86: " tip-bot for Robert Richter
  2012-04-05 16:24 ` [PATCH 3/4] perf: use static variant of perf_event_overflow in core.c Robert Richter
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Robert Richter @ 2012-04-05 16:24 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Stephane Eranian, Arnaldo Carvalho de Melo, LKML,
	Robert Richter

Now the return value of cmpxchg() is used to match an event. The
change removes the duplicate event comparison and traverses the list
until an event was removed. This also fixes the following warning:

 arch/x86/kernel/cpu/perf_event_amd.c:170: warning: value computed is not used

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
 arch/x86/kernel/cpu/perf_event_amd.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c
index 4be3463..6565226 100644
--- a/arch/x86/kernel/cpu/perf_event_amd.c
+++ b/arch/x86/kernel/cpu/perf_event_amd.c
@@ -210,10 +210,8 @@ static void amd_put_event_constraints(struct cpu_hw_events *cpuc,
 	 * when we come here
 	 */
 	for (i = 0; i < x86_pmu.num_counters; i++) {
-		if (nb->owners[i] == event) {
-			cmpxchg(nb->owners+i, event, NULL);
+		if (cmpxchg(nb->owners + i, event, NULL) == event)
 			break;
-		}
 	}
 }
 
-- 
1.7.8.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] perf: use static variant of perf_event_overflow in core.c
  2012-04-05 16:24 [PATCH 0/4] perf: Kernel updates Robert Richter
  2012-04-05 16:24 ` [PATCH 1/4] perf: Trivial cleanup of duplicate code Robert Richter
  2012-04-05 16:24 ` [PATCH 2/4] perf, x86: Fix cmpxchg() usage in amd_put_event_constraints() Robert Richter
@ 2012-04-05 16:24 ` Robert Richter
  2012-04-26 12:18   ` [tip:perf/core] perf: Use " tip-bot for Robert Richter
  2012-04-05 16:24 ` [PATCH 4/4] perf: Remove PERF_COUNTERS config option Robert Richter
  2012-04-24 16:37 ` [PATCH 0/4] perf: Kernel updates Robert Richter
  4 siblings, 1 reply; 11+ messages in thread
From: Robert Richter @ 2012-04-05 16:24 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Stephane Eranian, Arnaldo Carvalho de Melo, LKML,
	Robert Richter

No need to have an additional function layer.

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
 kernel/events/core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 8833198..e69a57d 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5349,7 +5349,7 @@ static enum hrtimer_restart perf_swevent_hrtimer(struct hrtimer *hrtimer)
 
 	if (regs && !perf_exclude_event(event, regs)) {
 		if (!(event->attr.exclude_idle && is_idle_task(current)))
-			if (perf_event_overflow(event, &data, regs))
+			if (__perf_event_overflow(event, 1, &data, regs))
 				ret = HRTIMER_NORESTART;
 	}
 
-- 
1.7.8.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] perf: Remove PERF_COUNTERS config option
  2012-04-05 16:24 [PATCH 0/4] perf: Kernel updates Robert Richter
                   ` (2 preceding siblings ...)
  2012-04-05 16:24 ` [PATCH 3/4] perf: use static variant of perf_event_overflow in core.c Robert Richter
@ 2012-04-05 16:24 ` Robert Richter
  2012-04-26 12:19   ` [tip:perf/core] " tip-bot for Robert Richter
  2012-04-24 16:37 ` [PATCH 0/4] perf: Kernel updates Robert Richter
  4 siblings, 1 reply; 11+ messages in thread
From: Robert Richter @ 2012-04-05 16:24 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Stephane Eranian, Arnaldo Carvalho de Melo, LKML,
	Robert Richter

Renaming remaining PERF_COUNTERS options into PERF_EVENTS.

Think we can get rid of PERF_COUNTERS now.

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
 arch/arm/configs/bcmring_defconfig        |    2 +-
 arch/powerpc/configs/chroma_defconfig     |    2 +-
 arch/powerpc/configs/gamecube_defconfig   |    2 +-
 arch/powerpc/configs/wii_defconfig        |    2 +-
 arch/sh/configs/sh7785lcr_32bit_defconfig |    2 +-
 arch/sparc/configs/sparc64_defconfig      |    2 +-
 init/Kconfig                              |   14 +-------------
 7 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/arch/arm/configs/bcmring_defconfig b/arch/arm/configs/bcmring_defconfig
index 795374d..9e6a8fe 100644
--- a/arch/arm/configs/bcmring_defconfig
+++ b/arch/arm/configs/bcmring_defconfig
@@ -11,7 +11,7 @@ CONFIG_KALLSYMS_EXTRA_PASS=y
 # CONFIG_TIMERFD is not set
 # CONFIG_EVENTFD is not set
 # CONFIG_AIO is not set
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
 # CONFIG_SLUB_DEBUG is not set
 # CONFIG_COMPAT_BRK is not set
diff --git a/arch/powerpc/configs/chroma_defconfig b/arch/powerpc/configs/chroma_defconfig
index acf7fb2..85acd89 100644
--- a/arch/powerpc/configs/chroma_defconfig
+++ b/arch/powerpc/configs/chroma_defconfig
@@ -32,7 +32,7 @@ CONFIG_RD_LZMA=y
 CONFIG_INITRAMFS_COMPRESSION_GZIP=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=y
 CONFIG_KPROBES=y
diff --git a/arch/powerpc/configs/gamecube_defconfig b/arch/powerpc/configs/gamecube_defconfig
index e74d3a4..9ef2cc1 100644
--- a/arch/powerpc/configs/gamecube_defconfig
+++ b/arch/powerpc/configs/gamecube_defconfig
@@ -8,7 +8,7 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_EXPERT=y
 # CONFIG_ELF_CORE is not set
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
 CONFIG_SLAB=y
 CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/wii_defconfig b/arch/powerpc/configs/wii_defconfig
index 175295f..1e2b7d0 100644
--- a/arch/powerpc/configs/wii_defconfig
+++ b/arch/powerpc/configs/wii_defconfig
@@ -9,7 +9,7 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_EXPERT=y
 # CONFIG_ELF_CORE is not set
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
 CONFIG_SLAB=y
 CONFIG_MODULES=y
diff --git a/arch/sh/configs/sh7785lcr_32bit_defconfig b/arch/sh/configs/sh7785lcr_32bit_defconfig
index 7b9c696..9bdcf72 100644
--- a/arch/sh/configs/sh7785lcr_32bit_defconfig
+++ b/arch/sh/configs/sh7785lcr_32bit_defconfig
@@ -5,7 +5,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=16
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig
index 3c1e858..9d8521b 100644
--- a/arch/sparc/configs/sparc64_defconfig
+++ b/arch/sparc/configs/sparc64_defconfig
@@ -5,7 +5,7 @@ CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_LOG_BUF_SHIFT=18
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
diff --git a/init/Kconfig b/init/Kconfig
index 3f42cd6..fad58a9 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1165,7 +1165,7 @@ menu "Kernel Performance Events And Counters"
 
 config PERF_EVENTS
 	bool "Kernel performance events and counters"
-	default y if (PROFILING || PERF_COUNTERS)
+	default y if PROFILING
 	depends on HAVE_PERF_EVENTS
 	select ANON_INODES
 	select IRQ_WORK
@@ -1192,18 +1192,6 @@ config PERF_EVENTS
 
 	  Say Y if unsure.
 
-config PERF_COUNTERS
-	bool "Kernel performance counters (old config option)"
-	depends on HAVE_PERF_EVENTS
-	help
-	  This config has been obsoleted by the PERF_EVENTS
-	  config option - please see that one for details.
-
-	  It has no effect on the kernel whether you enable
-	  it or not, it is a compatibility placeholder.
-
-	  Say N if unsure.
-
 config DEBUG_PERF_USE_VMALLOC
 	default n
 	bool "Debug: use vmalloc to back perf mmap() buffers"
-- 
1.7.8.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/4] perf: Kernel updates
  2012-04-05 16:24 [PATCH 0/4] perf: Kernel updates Robert Richter
                   ` (3 preceding siblings ...)
  2012-04-05 16:24 ` [PATCH 4/4] perf: Remove PERF_COUNTERS config option Robert Richter
@ 2012-04-24 16:37 ` Robert Richter
  2012-04-24 16:38   ` Peter Zijlstra
  4 siblings, 1 reply; 11+ messages in thread
From: Robert Richter @ 2012-04-24 16:37 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Stephane Eranian, Arnaldo Carvalho de Melo, LKML

On 05.04.12 18:24:40, Robert Richter wrote:
> Enclosed some changes made while working with the code. Mostly trivial
> but worth to add.
> 
> -Robert
> 
> 
> Robert Richter (4):
>   perf: Trivial cleanup of duplicate code
>   perf, x86: Fix cmpxchg() usage in amd_put_event_constraints()
>   perf: use static variant of perf_event_overflow in core.c
>   perf: Remove PERF_COUNTERS config option

Peter,

what's the status of this?

Thanks,

-Robert

> 
>  arch/arm/configs/bcmring_defconfig        |    2 +-
>  arch/powerpc/configs/chroma_defconfig     |    2 +-
>  arch/powerpc/configs/gamecube_defconfig   |    2 +-
>  arch/powerpc/configs/wii_defconfig        |    2 +-
>  arch/sh/configs/sh7785lcr_32bit_defconfig |    2 +-
>  arch/sparc/configs/sparc64_defconfig      |    2 +-
>  arch/x86/kernel/cpu/perf_event.c          |    3 ---
>  arch/x86/kernel/cpu/perf_event_amd.c      |    4 +---
>  init/Kconfig                              |   14 +-------------
>  kernel/events/core.c                      |    2 +-
>  10 files changed, 9 insertions(+), 26 deletions(-)
> 
> -- 
> 1.7.8.4
> 

-- 
Advanced Micro Devices, Inc.
Operating System Research Center


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/4] perf: Kernel updates
  2012-04-24 16:37 ` [PATCH 0/4] perf: Kernel updates Robert Richter
@ 2012-04-24 16:38   ` Peter Zijlstra
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Zijlstra @ 2012-04-24 16:38 UTC (permalink / raw)
  To: Robert Richter
  Cc: Ingo Molnar, Stephane Eranian, Arnaldo Carvalho de Melo, LKML

On Tue, 2012-04-24 at 18:37 +0200, Robert Richter wrote:
> Peter,
> 
> what's the status of this?
> 
> 
I've got them queued, I'll try and shove them Ingo-wards soon.

Thanks!

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [tip:perf/core] perf: Trivial cleanup of duplicate code
  2012-04-05 16:24 ` [PATCH 1/4] perf: Trivial cleanup of duplicate code Robert Richter
@ 2012-04-26 12:17   ` tip-bot for Robert Richter
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Robert Richter @ 2012-04-26 12:17 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, robert.richter, a.p.zijlstra, tglx

Commit-ID:  10c250234c98928d1e15c4cea1c44b9a25354ccf
Gitweb:     http://git.kernel.org/tip/10c250234c98928d1e15c4cea1c44b9a25354ccf
Author:     Robert Richter <robert.richter@amd.com>
AuthorDate: Thu, 5 Apr 2012 18:24:41 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 26 Apr 2012 13:52:50 +0200

perf: Trivial cleanup of duplicate code

Removing duplicate code.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1333643084-26776-2-git-send-email-robert.richter@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/perf_event.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index bb8e034..e33e9cf 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -484,9 +484,6 @@ static int __x86_pmu_event_init(struct perf_event *event)
 
 	/* mark unused */
 	event->hw.extra_reg.idx = EXTRA_REG_NONE;
-
-	/* mark not used */
-	event->hw.extra_reg.idx = EXTRA_REG_NONE;
 	event->hw.branch_reg.idx = EXTRA_REG_NONE;
 
 	return x86_pmu.hw_config(event);

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [tip:perf/core] perf/x86: Fix cmpxchg() usage in amd_put_event_constraints()
  2012-04-05 16:24 ` [PATCH 2/4] perf, x86: Fix cmpxchg() usage in amd_put_event_constraints() Robert Richter
@ 2012-04-26 12:18   ` tip-bot for Robert Richter
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Robert Richter @ 2012-04-26 12:18 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, robert.richter, a.p.zijlstra, tglx

Commit-ID:  5f09fc688936705b2020ca247df39ee27283668a
Gitweb:     http://git.kernel.org/tip/5f09fc688936705b2020ca247df39ee27283668a
Author:     Robert Richter <robert.richter@amd.com>
AuthorDate: Thu, 5 Apr 2012 18:24:42 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 26 Apr 2012 13:52:51 +0200

perf/x86: Fix cmpxchg() usage in amd_put_event_constraints()

Now the return value of cmpxchg() is used to match an event. The
change removes the duplicate event comparison and traverses the list
until an event was removed. This also fixes the following warning:

 arch/x86/kernel/cpu/perf_event_amd.c:170: warning: value computed is not used

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1333643084-26776-3-git-send-email-robert.richter@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/perf_event_amd.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c
index 95e7fe1..589286f 100644
--- a/arch/x86/kernel/cpu/perf_event_amd.c
+++ b/arch/x86/kernel/cpu/perf_event_amd.c
@@ -205,10 +205,8 @@ static void amd_put_event_constraints(struct cpu_hw_events *cpuc,
 	 * when we come here
 	 */
 	for (i = 0; i < x86_pmu.num_counters; i++) {
-		if (nb->owners[i] == event) {
-			cmpxchg(nb->owners+i, event, NULL);
+		if (cmpxchg(nb->owners + i, event, NULL) == event)
 			break;
-		}
 	}
 }
 

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [tip:perf/core] perf: Use static variant of perf_event_overflow in core.c
  2012-04-05 16:24 ` [PATCH 3/4] perf: use static variant of perf_event_overflow in core.c Robert Richter
@ 2012-04-26 12:18   ` tip-bot for Robert Richter
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Robert Richter @ 2012-04-26 12:18 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, robert.richter, a.p.zijlstra, tglx

Commit-ID:  33b07b8be7f0e1e8e4184e3473d71f174e4b0641
Gitweb:     http://git.kernel.org/tip/33b07b8be7f0e1e8e4184e3473d71f174e4b0641
Author:     Robert Richter <robert.richter@amd.com>
AuthorDate: Thu, 5 Apr 2012 18:24:43 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 26 Apr 2012 13:52:52 +0200

perf: Use static variant of perf_event_overflow in core.c

No need to have an additional function layer.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1333643084-26776-4-git-send-email-robert.richter@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/events/core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index a6a9ec4..9789a56 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5350,7 +5350,7 @@ static enum hrtimer_restart perf_swevent_hrtimer(struct hrtimer *hrtimer)
 
 	if (regs && !perf_exclude_event(event, regs)) {
 		if (!(event->attr.exclude_idle && is_idle_task(current)))
-			if (perf_event_overflow(event, &data, regs))
+			if (__perf_event_overflow(event, 1, &data, regs))
 				ret = HRTIMER_NORESTART;
 	}
 

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [tip:perf/core] perf: Remove PERF_COUNTERS config option
  2012-04-05 16:24 ` [PATCH 4/4] perf: Remove PERF_COUNTERS config option Robert Richter
@ 2012-04-26 12:19   ` tip-bot for Robert Richter
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Robert Richter @ 2012-04-26 12:19 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, robert.richter, a.p.zijlstra, tglx

Commit-ID:  392d65a9adbe2f09707d2de27110dafb9c8dc08b
Gitweb:     http://git.kernel.org/tip/392d65a9adbe2f09707d2de27110dafb9c8dc08b
Author:     Robert Richter <robert.richter@amd.com>
AuthorDate: Thu, 5 Apr 2012 18:24:44 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 26 Apr 2012 13:52:52 +0200

perf: Remove PERF_COUNTERS config option

Renaming remaining PERF_COUNTERS options into PERF_EVENTS.

Think we can get rid of PERF_COUNTERS now.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1333643084-26776-5-git-send-email-robert.richter@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/arm/configs/bcmring_defconfig        |    2 +-
 arch/powerpc/configs/chroma_defconfig     |    2 +-
 arch/powerpc/configs/gamecube_defconfig   |    2 +-
 arch/powerpc/configs/wii_defconfig        |    2 +-
 arch/sh/configs/sh7785lcr_32bit_defconfig |    2 +-
 arch/sparc/configs/sparc64_defconfig      |    2 +-
 init/Kconfig                              |   14 +-------------
 7 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/arch/arm/configs/bcmring_defconfig b/arch/arm/configs/bcmring_defconfig
index 795374d..9e6a8fe 100644
--- a/arch/arm/configs/bcmring_defconfig
+++ b/arch/arm/configs/bcmring_defconfig
@@ -11,7 +11,7 @@ CONFIG_KALLSYMS_EXTRA_PASS=y
 # CONFIG_TIMERFD is not set
 # CONFIG_EVENTFD is not set
 # CONFIG_AIO is not set
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
 # CONFIG_SLUB_DEBUG is not set
 # CONFIG_COMPAT_BRK is not set
diff --git a/arch/powerpc/configs/chroma_defconfig b/arch/powerpc/configs/chroma_defconfig
index f104ccd..b1f9597 100644
--- a/arch/powerpc/configs/chroma_defconfig
+++ b/arch/powerpc/configs/chroma_defconfig
@@ -32,7 +32,7 @@ CONFIG_RD_LZMA=y
 CONFIG_INITRAMFS_COMPRESSION_GZIP=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=y
 CONFIG_KPROBES=y
diff --git a/arch/powerpc/configs/gamecube_defconfig b/arch/powerpc/configs/gamecube_defconfig
index e74d3a4..9ef2cc1 100644
--- a/arch/powerpc/configs/gamecube_defconfig
+++ b/arch/powerpc/configs/gamecube_defconfig
@@ -8,7 +8,7 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_EXPERT=y
 # CONFIG_ELF_CORE is not set
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
 CONFIG_SLAB=y
 CONFIG_MODULES=y
diff --git a/arch/powerpc/configs/wii_defconfig b/arch/powerpc/configs/wii_defconfig
index 175295f..1e2b7d0 100644
--- a/arch/powerpc/configs/wii_defconfig
+++ b/arch/powerpc/configs/wii_defconfig
@@ -9,7 +9,7 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_EXPERT=y
 # CONFIG_ELF_CORE is not set
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
 CONFIG_SLAB=y
 CONFIG_MODULES=y
diff --git a/arch/sh/configs/sh7785lcr_32bit_defconfig b/arch/sh/configs/sh7785lcr_32bit_defconfig
index 7b9c696..9bdcf72 100644
--- a/arch/sh/configs/sh7785lcr_32bit_defconfig
+++ b/arch/sh/configs/sh7785lcr_32bit_defconfig
@@ -5,7 +5,7 @@ CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=16
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig
index 3c1e858..9d8521b 100644
--- a/arch/sparc/configs/sparc64_defconfig
+++ b/arch/sparc/configs/sparc64_defconfig
@@ -5,7 +5,7 @@ CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_LOG_BUF_SHIFT=18
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_PERF_COUNTERS=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
diff --git a/init/Kconfig b/init/Kconfig
index 6cfd71d..7e37135 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1156,7 +1156,7 @@ menu "Kernel Performance Events And Counters"
 
 config PERF_EVENTS
 	bool "Kernel performance events and counters"
-	default y if (PROFILING || PERF_COUNTERS)
+	default y if PROFILING
 	depends on HAVE_PERF_EVENTS
 	select ANON_INODES
 	select IRQ_WORK
@@ -1183,18 +1183,6 @@ config PERF_EVENTS
 
 	  Say Y if unsure.
 
-config PERF_COUNTERS
-	bool "Kernel performance counters (old config option)"
-	depends on HAVE_PERF_EVENTS
-	help
-	  This config has been obsoleted by the PERF_EVENTS
-	  config option - please see that one for details.
-
-	  It has no effect on the kernel whether you enable
-	  it or not, it is a compatibility placeholder.
-
-	  Say N if unsure.
-
 config DEBUG_PERF_USE_VMALLOC
 	default n
 	bool "Debug: use vmalloc to back perf mmap() buffers"

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-04-26 12:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-05 16:24 [PATCH 0/4] perf: Kernel updates Robert Richter
2012-04-05 16:24 ` [PATCH 1/4] perf: Trivial cleanup of duplicate code Robert Richter
2012-04-26 12:17   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-05 16:24 ` [PATCH 2/4] perf, x86: Fix cmpxchg() usage in amd_put_event_constraints() Robert Richter
2012-04-26 12:18   ` [tip:perf/core] perf/x86: " tip-bot for Robert Richter
2012-04-05 16:24 ` [PATCH 3/4] perf: use static variant of perf_event_overflow in core.c Robert Richter
2012-04-26 12:18   ` [tip:perf/core] perf: Use " tip-bot for Robert Richter
2012-04-05 16:24 ` [PATCH 4/4] perf: Remove PERF_COUNTERS config option Robert Richter
2012-04-26 12:19   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-24 16:37 ` [PATCH 0/4] perf: Kernel updates Robert Richter
2012-04-24 16:38   ` Peter Zijlstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.