lkml.org 
[lkml]   [2013]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] perf tools: allow user to specify hardware breakpoint bp_len
On 04/27, Oleg Nesterov wrote:
>
> On 04/26, Jacob Shin wrote:
> >
> > @@ -518,12 +518,10 @@ int parse_events_add_breakpoint(struct list_head **list, int *idx,
> > if (parse_breakpoint_type(type, &attr))
> > return -EINVAL;
> >
> > - /*
> > - * We should find a nice way to override the access length
> > - * Provide some defaults for now
> > - */
> > if (attr.bp_type == HW_BREAKPOINT_X)
> > attr.bp_len = sizeof(long);
> > + else if (len)
> > + attr.bp_len = len;
> > else
> > attr.bp_len = HW_BREAKPOINT_LEN_4;
>
> Stupid question... So X86_FEATURE_BPEXT only works for r/w? I mean, it
> doesn't allow to specify the mask for an execute breakpoint?
>
> Otherwise the code above should be probably updated, say,
>
> if (!len) {
> len = attr.bp_type == HW_BREAKPOINT_X ?
> sizeof(long) : HW_BREAKPOINT_LEN_4;
> }
> attr.bp_len = len;

OK, we can't do this until we change arch_build_bp_info() which
insists on sizeof(long) and sets X86_BREAKPOINT_LEN_X == 1.

Please ignore...

Oleg.



\
 
 \ /
  Last update: 2013-04-27 20:01    [W:0.092 / U:1.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site