mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Jacob Shin <jacob.shin@amd.com>
Cc: Ingo Molnar <mingo@redhat.com>, Oleg Nesterov <oleg@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"x86@kernel.org" <x86@kernel.org>,
	Stephane Eranian <eranian@google.com>,
	Jiri Olsa <jolsa@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 1/4] perf: Add hardware breakpoint address mask
Date: Tue, 23 Apr 2013 16:02:40 +0100	[thread overview]
Message-ID: <20130423150240.GD18616@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <20130423144057.GA19644@jshin-Toonie>

On Tue, Apr 23, 2013 at 03:40:57PM +0100, Jacob Shin wrote:
> On Tue, Apr 23, 2013 at 09:34:23AM -0500, Jacob Shin wrote:
> > On Tue, Apr 23, 2013 at 10:54:37AM +0100, Will Deacon wrote:
> > > Can you see a problem if I simply invert the mask?
> > 
> > That's great! No, I don't see a problem at all.

Great! The GDB folks have been asking for this, so I can finally make them
go away now :)

> > I guess now it can be debated if the mask coming in from userland should
> > be include or exclude mask. But I think exclude makes syntax easier:
> > 
> > To count writes to [0x1000 ~ 0x1010)
> > 
> > Include mask (my current patchset):
>   ^^^^^^^
>   Exclude (I mean ..)
> > 
> >   perf stat -e mem:0x1000/0xf:w a.out

Are you saying that this command would count any write to:

	0x1000
	0x1001
	...
	0x100e
	0x100f

?

If so, that differs from the ARM debug architecture in that the mask is called
`byte-address-select', so a mask of 0b1001 would count accesses at +0 bytes
and +3 bytes from the base address. Is that possible to describe with your
masking scheme and a single watchpoint?

A mask of 0xf, would count +0, +1, +2 and +3 (essentially bp_len == 4).

Unfortunately, that means I can't just invert the mask like I originally
thought.

Will

  reply	other threads:[~2013-04-23 15:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23  7:57 [PATCH V2 0/4] perf: Add support for hardware breakpoint address masks Jacob Shin
2013-04-23  7:57 ` [PATCH V2 1/4] perf: Add hardware breakpoint address mask Jacob Shin
2013-04-23  9:54   ` Will Deacon
2013-04-23 14:34     ` Jacob Shin
2013-04-23 14:40       ` Jacob Shin
2013-04-23 15:02         ` Will Deacon [this message]
2013-04-23 15:18           ` Jacob Shin
2013-04-24  9:48             ` Will Deacon
2013-04-24 16:30               ` Jacob Shin
2013-04-25 17:06                 ` Oleg Nesterov
2013-04-25 17:17                   ` H. Peter Anvin
2013-04-25 23:19                     ` Jacob Shin
2013-04-26 16:20                       ` Will Deacon
2013-04-26 16:31                         ` Jacob Shin
2013-04-26 16:47                       ` Oleg Nesterov
2013-04-23 13:18   ` Oleg Nesterov
2013-04-23 14:25     ` Jacob Shin
2013-04-24 23:08       ` Frederic Weisbecker
2013-04-25 15:10         ` Oleg Nesterov
2013-04-25 15:57           ` Oleg Nesterov
2013-04-25 16:59           ` Jacob Shin
2013-04-25 17:33             ` Oleg Nesterov
2013-04-23  7:57 ` [PATCH V2 2/4] perf/x86/amd: AMD implementation for " Jacob Shin
2013-04-23 13:22   ` Oleg Nesterov
2013-04-23  7:57 ` [PATCH V2 3/4] perf tools: Add hardware breakpoint address mask event parser Jacob Shin
2013-04-23  7:57 ` [PATCH V2 4/4] perf tools: Add hardware breakpoint address mask test cases Jacob Shin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130423150240.GD18616@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jacob.shin@amd.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome