All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] hw-breakpoint fix
@ 2010-02-04  1:46 Frederic Weisbecker
  2010-02-11 11:12 ` Mahesh Jagannath Salgaonkar
  0 siblings, 1 reply; 4+ messages in thread
From: Frederic Weisbecker @ 2010-02-04  1:46 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: LKML, Frederic Weisbecker, Mahesh Salgaonkar, Peter Zijlstra,
	Ananth N Mavinakayanahalli, K. Prasad, Maneesh Soni,
	Heiko Carstens, Martin

Ingo,

Please pull the perf/urgent branch that can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
	perf/urgent

Thanks,
	Frederic
---

Mahesh Salgaonkar (1):
      perf: Make bp_len type to u64 generic across the arch


 include/linux/hw_breakpoint.h |    2 +-
 include/linux/perf_event.h    |    6 ++----
 kernel/hw_breakpoint.c        |    2 +-
 kernel/perf_event.c           |    2 +-
 4 files changed, 5 insertions(+), 7 deletions(-)

---
commit cd757645fbdc34a8343c04bb0e74e06fccc2cb10
Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Date:   Sat Jan 30 10:25:18 2010 +0530

    perf: Make bp_len type to u64 generic across the arch
    
    Change 'bp_len' type to __u64 to make it work across archs as
    the s390 architecture watch point length can be upto 2^64.
    
    reference:
    	http://lkml.org/lkml/2010/1/25/212
    
    This is an ABI change that is not backward compatible with
    the previous hardware breakpoint info layout integrated in this
    development cycle, a rebuilt of perf tools is necessary for
    versions based on 2.6.33-rc1 - 2.6.33-rc6 to work with a
    kernel based on this patch.
    
    Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
    Acked-by: Peter Zijlstra <peterz@infradead.org>
    Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
    Cc: "K. Prasad" <prasad@linux.vnet.ibm.com>
    Cc: Maneesh Soni <maneesh@in.ibm.com>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Martin <schwidefsky@de.ibm.com>
    LKML-Reference: <20100130045518.GA20776@in.ibm.com>
    Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>

diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h
index 070ba06..5977b72 100644
--- a/include/linux/hw_breakpoint.h
+++ b/include/linux/hw_breakpoint.h
@@ -44,7 +44,7 @@ static inline int hw_breakpoint_type(struct perf_event *bp)
 	return bp->attr.bp_type;
 }
 
-static inline int hw_breakpoint_len(struct perf_event *bp)
+static inline unsigned long hw_breakpoint_len(struct perf_event *bp)
 {
 	return bp->attr.bp_len;
 }
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 8fa7187..a177698 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -211,11 +211,9 @@ struct perf_event_attr {
 		__u32		wakeup_watermark; /* bytes before wakeup   */
 	};
 
-	__u32			__reserved_2;
-
-	__u64			bp_addr;
 	__u32			bp_type;
-	__u32			bp_len;
+	__u64			bp_addr;
+	__u64			bp_len;
 };
 
 /*
diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c
index 8a5c7d5..967e661 100644
--- a/kernel/hw_breakpoint.c
+++ b/kernel/hw_breakpoint.c
@@ -360,8 +360,8 @@ EXPORT_SYMBOL_GPL(register_user_hw_breakpoint);
 int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr)
 {
 	u64 old_addr = bp->attr.bp_addr;
+	u64 old_len = bp->attr.bp_len;
 	int old_type = bp->attr.bp_type;
-	int old_len = bp->attr.bp_len;
 	int err = 0;
 
 	perf_event_disable(bp);
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index d27746b..2b19297 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4580,7 +4580,7 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr,
 	if (attr->type >= PERF_TYPE_MAX)
 		return -EINVAL;
 
-	if (attr->__reserved_1 || attr->__reserved_2)
+	if (attr->__reserved_1)
 		return -EINVAL;
 
 	if (attr->sample_type & ~(PERF_SAMPLE_MAX-1))

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

* Re: [GIT PULL] hw-breakpoint fix
  2010-02-04  1:46 [GIT PULL] hw-breakpoint fix Frederic Weisbecker
@ 2010-02-11 11:12 ` Mahesh Jagannath Salgaonkar
  2010-02-11 14:49   ` Frederic Weisbecker
  0 siblings, 1 reply; 4+ messages in thread
From: Mahesh Jagannath Salgaonkar @ 2010-02-11 11:12 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: Ingo Molnar, LKML, Peter Zijlstra, Ananth N Mavinakayanahalli,
	K. Prasad, Maneesh Soni, Heiko Carstens, Martin

Hi Ingo,

Will this patch be pushed in to Linux tree? This patch contains ABI 
chnage w.r.t hardware breakpoint info layout and needs to go in .33

Thanks,
-Mahesh.

On 02/04/2010 07:16 AM, Frederic Weisbecker wrote:
> Ingo,
>
> Please pull the perf/urgent branch that can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
> 	perf/urgent
>
> Thanks,
> 	Frederic
> ---
>
> Mahesh Salgaonkar (1):
>        perf: Make bp_len type to u64 generic across the arch
>
>
>   include/linux/hw_breakpoint.h |    2 +-
>   include/linux/perf_event.h    |    6 ++----
>   kernel/hw_breakpoint.c        |    2 +-
>   kernel/perf_event.c           |    2 +-
>   4 files changed, 5 insertions(+), 7 deletions(-)
>
> ---
> commit cd757645fbdc34a8343c04bb0e74e06fccc2cb10
> Author: Mahesh Salgaonkar<mahesh@linux.vnet.ibm.com>
> Date:   Sat Jan 30 10:25:18 2010 +0530
>
>      perf: Make bp_len type to u64 generic across the arch
>
>      Change 'bp_len' type to __u64 to make it work across archs as
>      the s390 architecture watch point length can be upto 2^64.
>
>      reference:
>      	http://lkml.org/lkml/2010/1/25/212
>
>      This is an ABI change that is not backward compatible with
>      the previous hardware breakpoint info layout integrated in this
>      development cycle, a rebuilt of perf tools is necessary for
>      versions based on 2.6.33-rc1 - 2.6.33-rc6 to work with a
>      kernel based on this patch.
>
>      Signed-off-by: Mahesh Salgaonkar<mahesh@linux.vnet.ibm.com>
>      Acked-by: Peter Zijlstra<peterz@infradead.org>
>      Cc: Ananth N Mavinakayanahalli<ananth@in.ibm.com>
>      Cc: "K. Prasad"<prasad@linux.vnet.ibm.com>
>      Cc: Maneesh Soni<maneesh@in.ibm.com>
>      Cc: Heiko Carstens<heiko.carstens@de.ibm.com>
>      Cc: Martin<schwidefsky@de.ibm.com>
>      LKML-Reference:<20100130045518.GA20776@in.ibm.com>
>      Signed-off-by: Frederic Weisbecker<fweisbec@gmail.com>
>
> diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h
> index 070ba06..5977b72 100644
> --- a/include/linux/hw_breakpoint.h
> +++ b/include/linux/hw_breakpoint.h
> @@ -44,7 +44,7 @@ static inline int hw_breakpoint_type(struct perf_event *bp)
>   	return bp->attr.bp_type;
>   }
>
> -static inline int hw_breakpoint_len(struct perf_event *bp)
> +static inline unsigned long hw_breakpoint_len(struct perf_event *bp)
>   {
>   	return bp->attr.bp_len;
>   }
> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> index 8fa7187..a177698 100644
> --- a/include/linux/perf_event.h
> +++ b/include/linux/perf_event.h
> @@ -211,11 +211,9 @@ struct perf_event_attr {
>   		__u32		wakeup_watermark; /* bytes before wakeup   */
>   	};
>
> -	__u32			__reserved_2;
> -
> -	__u64			bp_addr;
>   	__u32			bp_type;
> -	__u32			bp_len;
> +	__u64			bp_addr;
> +	__u64			bp_len;
>   };
>
>   /*
> diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c
> index 8a5c7d5..967e661 100644
> --- a/kernel/hw_breakpoint.c
> +++ b/kernel/hw_breakpoint.c
> @@ -360,8 +360,8 @@ EXPORT_SYMBOL_GPL(register_user_hw_breakpoint);
>   int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr)
>   {
>   	u64 old_addr = bp->attr.bp_addr;
> +	u64 old_len = bp->attr.bp_len;
>   	int old_type = bp->attr.bp_type;
> -	int old_len = bp->attr.bp_len;
>   	int err = 0;
>
>   	perf_event_disable(bp);
> diff --git a/kernel/perf_event.c b/kernel/perf_event.c
> index d27746b..2b19297 100644
> --- a/kernel/perf_event.c
> +++ b/kernel/perf_event.c
> @@ -4580,7 +4580,7 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr,
>   	if (attr->type>= PERF_TYPE_MAX)
>   		return -EINVAL;
>
> -	if (attr->__reserved_1 || attr->__reserved_2)
> +	if (attr->__reserved_1)
>   		return -EINVAL;
>
>   	if (attr->sample_type&  ~(PERF_SAMPLE_MAX-1))


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

* Re: [GIT PULL] hw-breakpoint fix
  2010-02-11 11:12 ` Mahesh Jagannath Salgaonkar
@ 2010-02-11 14:49   ` Frederic Weisbecker
  0 siblings, 0 replies; 4+ messages in thread
From: Frederic Weisbecker @ 2010-02-11 14:49 UTC (permalink / raw)
  To: Mahesh Jagannath Salgaonkar
  Cc: Ingo Molnar, LKML, Peter Zijlstra, Ananth N Mavinakayanahalli,
	K. Prasad, Maneesh Soni, Heiko Carstens, Martin

On Thu, Feb 11, 2010 at 04:42:11PM +0530, Mahesh Jagannath Salgaonkar wrote:
> Hi Ingo,
>
> Will this patch be pushed in to Linux tree? This patch contains ABI  
> chnage w.r.t hardware breakpoint info layout and needs to go in .33
>
> Thanks,
> -Mahesh.


It is in the tip:perf/urgent branch, which means Ingo will likely send
a pull request soon with this patch inside.

Thanks.


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

* [GIT PULL] hw-breakpoint fix
@ 2010-02-28 20:53 Frederic Weisbecker
  0 siblings, 0 replies; 4+ messages in thread
From: Frederic Weisbecker @ 2010-02-28 20:53 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: LKML, Frederic Weisbecker, 2 . 6 . 33 . x, Peter Zijlstra,
	K . Prasad, Paul Mackerras

Ingo,

Please pull the perf/urgent branch that can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
	perf/urgent

Thanks,
	Frederic
---

Frederic Weisbecker (1):
      hw-breakpoints: Remove stub unthrottle callback


 arch/x86/kernel/hw_breakpoint.c |    5 -----
 kernel/hw_breakpoint.c          |    1 -
 2 files changed, 0 insertions(+), 6 deletions(-)

---
commit 1e259e0a9982078896f3404240096cbea01daca4
Author: Frederic Weisbecker <fweisbec@gmail.com>
Date:   Sun Feb 28 20:51:15 2010 +0100

    hw-breakpoints: Remove stub unthrottle callback
    
    We support event unthrottling in breakpoint events. It means
    that if we have more than sysctl_perf_event_sample_rate/HZ,
    perf will throttle, ignoring subsequent events until the next
    tick.
    
    So if ptrace exceeds this max rate, it will omit events, which
    breaks the ptrace determinism that is supposed to report every
    triggered breakpoints. This is likely to happen if we set
    sysctl_perf_event_sample_rate to 1.
    
    This patch removes support for unthrottling in breakpoint
    events to break throttling and restore ptrace determinism.
    
    Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: 2.6.33.x <stable@kernel.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: K.Prasad <prasad@linux.vnet.ibm.com>
    Cc: Paul Mackerras <paulus@samba.org>

diff --git a/arch/x86/kernel/hw_breakpoint.c b/arch/x86/kernel/hw_breakpoint.c
index bb6006e..1e8cead 100644
--- a/arch/x86/kernel/hw_breakpoint.c
+++ b/arch/x86/kernel/hw_breakpoint.c
@@ -531,8 +531,3 @@ void hw_breakpoint_pmu_read(struct perf_event *bp)
 {
 	/* TODO */
 }
-
-void hw_breakpoint_pmu_unthrottle(struct perf_event *bp)
-{
-	/* TODO */
-}
diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c
index 967e661..4d99512 100644
--- a/kernel/hw_breakpoint.c
+++ b/kernel/hw_breakpoint.c
@@ -489,5 +489,4 @@ struct pmu perf_ops_bp = {
 	.enable		= arch_install_hw_breakpoint,
 	.disable	= arch_uninstall_hw_breakpoint,
 	.read		= hw_breakpoint_pmu_read,
-	.unthrottle	= hw_breakpoint_pmu_unthrottle
 };

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

end of thread, other threads:[~2010-02-28 20:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-04  1:46 [GIT PULL] hw-breakpoint fix Frederic Weisbecker
2010-02-11 11:12 ` Mahesh Jagannath Salgaonkar
2010-02-11 14:49   ` Frederic Weisbecker
2010-02-28 20:53 Frederic Weisbecker

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.