Re: [PATCH 1/5] perf: Add hardware breakpoint address mask

2013-04-22 Thread Jacob Shin
On Mon, Apr 22, 2013 at 04:37:15PM -0500, Jacob Shin wrote: > On Sun, Apr 21, 2013 at 07:02:02PM +0200, Oleg Nesterov wrote: > > On 04/20, Jacob Shin wrote: > > > > > > On Sat, Apr 20, 2013 at 06:53:34PM +0200, Oleg Nesterov wrote: > > > > > > > > And does attr.bp_len "contribute" to the mask? > >

Re: [PATCH 1/5] perf: Add hardware breakpoint address mask

2013-04-22 Thread Jacob Shin
On Sun, Apr 21, 2013 at 07:02:02PM +0200, Oleg Nesterov wrote: > On 04/20, Jacob Shin wrote: > > > > On Sat, Apr 20, 2013 at 06:53:34PM +0200, Oleg Nesterov wrote: > > > > > > And does attr.bp_len "contribute" to the mask? > > > > > > I mean, if bp_len == X86_BREAKPOINT_LEN_8, does this mean that >

Re: [PATCH 1/5] perf: Add hardware breakpoint address mask

2013-04-21 Thread Oleg Nesterov
On 04/20, Jacob Shin wrote: > > On Sat, Apr 20, 2013 at 06:53:34PM +0200, Oleg Nesterov wrote: > > > > And does attr.bp_len "contribute" to the mask? > > > > I mean, if bp_len == X86_BREAKPOINT_LEN_8, does this mean that > > bp_bp_addr_mask and (bp_bp_addr_mask | 7) have the same effect? > > Yes it

Re: [PATCH 1/5] perf: Add hardware breakpoint address mask

2013-04-21 Thread Oleg Nesterov
On 04/20, Jacob Shin wrote: > > On Sat, Apr 20, 2013 at 06:22:23PM +0200, Oleg Nesterov wrote: > > On 04/09, Jacob Shin wrote: > > > > > > @@ -612,6 +612,9 @@ static int hw_breakpoint_add(struct perf_event *bp, > > > int flags) > > > if (!(flags & PERF_EF_START)) > > > bp->hw.state = P

Re: [PATCH 1/5] perf: Add hardware breakpoint address mask

2013-04-20 Thread Jacob Shin
On Sat, Apr 20, 2013 at 06:53:34PM +0200, Oleg Nesterov wrote: > On 04/09, Jacob Shin wrote: > > > > The following patchset adds address masks to existing perf hardware > > breakpoint mechanism to allow trapping on an address range (currently > > only single address) on supported architectures. > >

Re: [PATCH 1/5] perf: Add hardware breakpoint address mask

2013-04-20 Thread Jacob Shin
On Sat, Apr 20, 2013 at 06:22:23PM +0200, Oleg Nesterov wrote: > On 04/09, Jacob Shin wrote: > > > > @@ -612,6 +612,9 @@ static int hw_breakpoint_add(struct perf_event *bp, int > > flags) > > if (!(flags & PERF_EF_START)) > > bp->hw.state = PERF_HES_STOPPED; > > > > + if (bp->att

Re: [PATCH 1/5] perf: Add hardware breakpoint address mask

2013-04-20 Thread Oleg Nesterov
On 04/09, Jacob Shin wrote: > > @@ -612,6 +612,9 @@ static int hw_breakpoint_add(struct perf_event *bp, int > flags) > if (!(flags & PERF_EF_START)) > bp->hw.state = PERF_HES_STOPPED; > > + if (bp->attr.bp_addr_mask && !arch_has_hw_breakpoint_addr_mask()) > + re

[PATCH 1/5] perf: Add hardware breakpoint address mask

2013-04-09 Thread Jacob Shin
Some architectures (for us, AMD Family 16h) allow for "don't care" bit mask to further qualify a hardware breakpoint address, in order to trap on range of addresses. Update perf uapi to add bp_addr_mask field and define HAVE_HW_BREAKPOINT_ADDR_MASK. Signed-off-by: Jacob Shin --- arch/Kconfig

[PATCH 1/5] perf: Add hardware breakpoint address mask

2012-12-12 Thread Jacob Shin
Some architectures (for us, AMD Family 16h) allow for "don't care" bit mask to further qualify a hardware breakpoint address, in order to trap on range of addresses. Update perf uapi to add bp_addr_mask field and define HAVE_HW_BREAKPOINT_ADDR_MASK. Signed-off-by: Jacob Shin --- arch/Kconfig