From: Jacob Shin <jacob.shin@amd.com>
To: Will Deacon <will.deacon@arm.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Oleg Nesterov <oleg@redhat.com>,
Ingo Molnar <mingo@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
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: Fri, 26 Apr 2013 11:31:06 -0500 [thread overview]
Message-ID: <20130426163106.GA25844@jshin-Toonie> (raw)
In-Reply-To: <20130426162043.GK30858@mudshark.cambridge.arm.com>
On Fri, Apr 26, 2013 at 05:20:44PM +0100, Will Deacon wrote:
> Hi Jacob,
>
> On Fri, Apr 26, 2013 at 12:19:11AM +0100, Jacob Shin wrote:
> > On Thu, Apr 25, 2013 at 10:17:35AM -0700, H. Peter Anvin wrote:
> > > On 04/25/2013 10:06 AM, Oleg Nesterov wrote:
> > > >>
> > > >> The downside is that in userland perf tool we need differing documentation
> > > >> on what the mask syntax means for each architecture.
> > > >
> > > > Personally I think this is acceptable.
> > > >
> > > > But I am new to this code, so...
> > > >
> > >
> > > That would seem really, really awkward. Yes, perf has a bunch of
> > > low-level stuff, but it would seem highly undesirable to force the user
> > > to deal with something like that.
> > >
> > > It would be good to have a user-friendly syntax that covers most of what
> > > users may want to do and perhaps a longer form that can express
> > > everything including ARM's byte selects; if the system can't honor the
> > > request it should return an error.
> >
> > Okay,
> >
> > If arch specific masks are a no go, then I think I'm convinced that
> > Oleg's idea of using bp_len is the right thing to do. Right now perf
> > userland tool hard codes bp_len to 4, so I need to modify it to allow
> > user to override the length if desired.
>
> So what value ends up in the bp_len field: a length or a mask? I just want
> to make sure it's flexible enough that, if we add another user interface for
> the byte-select stuff, we don't need to butcher the attr in another way.
It is length. Just as it is today, userland API does not change at all.
>
> > Oleg, Frederic, et al.
> >
> > Which syntax do you prefer?
> >
> > If we want to set bp_len to 16:
> >
> > $ perf stat -e mem:0x1000:rw:16
> >
> > Or
> >
> > $ perf stat -e mem:0x1000:16
> >
> > Or
> >
> > $ perf stat -e mem:0x1000/16
> >
> > If no bp_len value is specified, it will still default to 4 as it did
> > before.
>
> I certainly like the ability to change the length of an execute breakpoint,
> as that helps for halfword instructions on ARM (not sure if your first
> syntax precludes that, but just checking...).
All three are equivalent, I just need to pick one and implement/document.
-Jacob
next prev parent reply other threads:[~2013-04-26 16:31 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
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 [this message]
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=20130426163106.GA25844@jshin-Toonie \
--to=jacob.shin@amd.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
--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
all inboxes | Powered by JetHome®